From 0c051481e935027adf76f5ca15635c659076fa87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 10 Feb 2004 14:46:03 +0000 Subject: [PATCH] Fix #74063 - if there's a restacking operation, cancel pending autoraise for the window. svn path=/trunk/kdebase/kwin/; revision=286801 --- activation.cpp | 7 ++----- client.cpp | 6 ++++++ client.h | 1 + events.cpp | 3 +-- layers.cpp | 8 ++++++++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/activation.cpp b/activation.cpp index 15d6801db8..d9f39b8881 100644 --- a/activation.cpp +++ b/activation.cpp @@ -704,11 +704,8 @@ void Client::setActive( bool act) if ( active ) Notify::raise( Notify::Activate ); - if ( !active && autoRaiseTimer ) - { - delete autoRaiseTimer; - autoRaiseTimer = 0; - } + if( !active ) + cancelAutoRaise(); if( !active && shade_mode == ShadeActivated ) setShade( ShadeNormal ); diff --git a/client.cpp b/client.cpp index 4005bf123d..cdbcca45bf 100644 --- a/client.cpp +++ b/client.cpp @@ -1632,6 +1632,12 @@ void Client::autoRaise() autoRaiseTimer = 0; } +void Client::cancelAutoRaise() + { + delete autoRaiseTimer; + autoRaiseTimer = 0; + } + #ifdef NDEBUG kndbgstream& operator<<( kndbgstream& stream, const Client* ) { return stream; } kndbgstream& operator<<( kndbgstream& stream, const ClientList& ) { return stream; } diff --git a/client.h b/client.h index b8864f3245..bda520574f 100644 --- a/client.h +++ b/client.h @@ -276,6 +276,7 @@ class Client : public QObject, public KDecorationDefines void toggleShade(); void showContextHelp(); void autoRaise(); + void cancelAutoRaise(); void shadeHover(); void destroyClient(); diff --git a/events.cpp b/events.cpp index 903fd8ebf2..c5d495b84c 100644 --- a/events.cpp +++ b/events.cpp @@ -893,8 +893,7 @@ void Client::leaveNotifyEvent( XCrossingEvent* e ) } if ( lostMouse ) { - delete autoRaiseTimer; - autoRaiseTimer = 0; + cancelAutoRaise(); delete shadeHoverTimer; shadeHoverTimer = 0; if ( shade_mode == ShadeHover && !moveResizeMode && !buttonDown ) diff --git a/layers.cpp b/layers.cpp index a63aebd9d9..3b8ceb26f7 100644 --- a/layers.cpp +++ b/layers.cpp @@ -269,6 +269,8 @@ void Workspace::lowerClient( Client* c ) if ( !c ) return; + c->cancelAutoRaise(); + StackingUpdatesBlocker blocker( this ); unconstrained_stacking_order.remove( c ); @@ -292,6 +294,8 @@ void Workspace::lowerClientWithinApplication( Client* c ) if ( !c ) return; + c->cancelAutoRaise(); + StackingUpdatesBlocker blocker( this ); unconstrained_stacking_order.remove( c ); @@ -316,6 +320,8 @@ void Workspace::raiseClient( Client* c ) if ( !c ) return; + c->cancelAutoRaise(); + StackingUpdatesBlocker blocker( this ); if( c->isTransient()) @@ -339,6 +345,8 @@ void Workspace::raiseClientWithinApplication( Client* c ) if ( !c ) return; + c->cancelAutoRaise(); + StackingUpdatesBlocker blocker( this ); // ignore mainwindows