From 984c76f0c18f118ba48f81d1978de7867a197536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 10 Oct 2003 13:00:26 +0000 Subject: [PATCH] More shade related changes. svn path=/trunk/kdebase/kwin/; revision=257727 --- activation.cpp | 2 +- events.cpp | 28 ++++++++++++++-------------- geometry.cpp | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/activation.cpp b/activation.cpp index 80baae4636..b0c7a8d034 100644 --- a/activation.cpp +++ b/activation.cpp @@ -712,7 +712,7 @@ void Client::setActive( bool act) autoRaiseTimer = 0; } - if( shade_mode == ShadeActivated ) + if( !active && shade_mode == ShadeActivated ) setShade( ShadeNormal ); StackingUpdatesBlocker blocker( workspace()); diff --git a/events.cpp b/events.cpp index 540b7d9193..6a8a7ac4d3 100644 --- a/events.cpp +++ b/events.cpp @@ -587,19 +587,19 @@ void Client::mapRequestEvent( XMapRequestEvent* e ) // also copied in clientMessage() if( isMinimized()) unminimize(); - else if( isShade()) + if( isShade()) setShade( ShadeNone ); - else // it's on another virtual desktop - { - if( workspace()->allowClientActivation( this )) - workspace()->activateClient( this ); - else - demandAttention(); - } - break; - case NormalState: - // TODO fake MapNotify? - break; + if( !isOnCurrentDesktop()) + { + if( workspace()->allowClientActivation( this )) + workspace()->activateClient( this ); + else + demandAttention(); + } + break; + case NormalState: + // TODO fake MapNotify? + break; } } @@ -668,9 +668,9 @@ void Client::clientMessageEvent( XClientMessageEvent* e ) { // copied from mapRequest() if( isMinimized()) unminimize(); - else if( isShade()) + if( isShade()) setShade( ShadeNone ); - else // it's on another virtual desktop + if( !isOnCurrentDesktop()) { if( workspace()->allowClientActivation( this )) workspace()->activateClient( this ); diff --git a/geometry.cpp b/geometry.cpp index bf9776e30b..4cf35d97b8 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1456,7 +1456,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root ) } // ShadeHover or ShadeActive, ShadeNormal was already avoided above - if ( mode != Center && shade_mode != ShadeNone ) + if ( mode != Center && shade_mode != ShadeNone ) // SHADE setShade( ShadeNone ); QPoint globalPos( x_root, y_root );