From fea6754bb921c4109027a8d78db60a0b123916e1 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sun, 9 Jul 2000 21:43:19 +0000 Subject: [PATCH] more focus-follows-mind stuff svn path=/trunk/kdebase/kwin/; revision=55886 --- client.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client.cpp b/client.cpp index 32df54e5a2..0838c144bc 100644 --- a/client.cpp +++ b/client.cpp @@ -1599,7 +1599,7 @@ bool Client::x11Event( XEvent * e) if ( options->focusPolicy == Options::ClickToFocus ) return TRUE; - if ( options->autoRaise ) { + if ( options->autoRaise && !isDesktop() && !isDock() ) { delete autoRaiseTimer; autoRaiseTimer = new QTimer( this ); connect( autoRaiseTimer, SIGNAL( timeout() ), this, SLOT( autoRaise() ) ); @@ -1613,14 +1613,15 @@ bool Client::x11Event( XEvent * e) return TRUE; } if ( e->type == LeaveNotify && e->xcrossing.mode == NotifyNormal ) { - if ( e->xcrossing.detail == NotifyInferior ) - return FALSE; - delete autoRaiseTimer; - autoRaiseTimer = 0; if ( !buttonDown ) setCursor( arrowCursor ); + bool lostMouse = !rect().contains( QPoint( e->xcrossing.x, e->xcrossing.y ) ); + if ( lostMouse ) { + delete autoRaiseTimer; + autoRaiseTimer = 0; + } if ( options->focusPolicy == Options::FocusStrictlyUnderMouse ) - if ( isActive() && !rect().contains( QPoint( e->xcrossing.x, e->xcrossing.y ) ) ) + if ( isActive() && lostMouse ) workspace()->requestFocus( 0 ) ; return TRUE; } @@ -1780,7 +1781,6 @@ void Client::setActive( bool act) return; active = act; if ( !active && autoRaiseTimer ) { - qDebug("delete autoraise setActive %s", caption().latin1()); delete autoRaiseTimer; autoRaiseTimer = 0; } @@ -2344,7 +2344,6 @@ QPixmap Client::animationPixmap( int w ) void Client::autoRaise() { - qDebug("autoRaise %s", caption().latin1()); workspace()->raiseClient( this ); delete autoRaiseTimer; autoRaiseTimer = 0;