[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdebase/workspace/kwin
From:       Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date:       2010-01-23 3:43:49
Message-ID: 1264218229.913156.23408.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1078878 by hpereiradacosta:

Backport: r1078877
revert r1078325 and moves the handling of Maximize state changes when
un-grouping windows to clientgroup.cpp. Ensures that 
Client::maximize( MaximizeRestore ) is called when appropriate to avoid 
decoration artifacts.
CCBUG: 223060


 M  +12 -1     clientgroup.cpp  
 M  +1 -2      geometry.cpp  


--- branches/KDE/4.4/kdebase/workspace/kwin/clientgroup.cpp #1078877:1078878
@@ -165,8 +165,19 @@
 
     c->setClientGroup( toNullGroup ? NULL : new ClientGroup( c ));
     if( newGeom.isValid() )
+        {
+        // HACK: if the group was maximized, one needs to make some checks on the \
future client maximize mode +        // because the transition from maximized to \
MaximizeRestore is not handled properly in setGeometry when +        // the new \
geometry size is unchanged. +        // since newGeom has the same size as the old \
client geometry, one just needs to check the topLeft position of newGeom +        // \
and compare that to the group maximize mode. +        // when the new mode is \
predicted to be MaximizeRestore, one must set it manually, in order to avoid \
decoration artifacts +        Client::MaximizeMode groupMaxMode( \
newVisible->maximizeMode() ); +        if( ( ( groupMaxMode & \
Client::MaximizeHorizontal ) && newGeom.left() != newVisible->geometry().left() ) ||  \
+            ( ( groupMaxMode & Client::MaximizeVertical ) && newGeom.top() != \
newVisible->geometry().top() ) ) +            c->maximize( Client::MaximizeRestore );
         c->setGeometry( newGeom );
-
+        }
     newVisible->triggerDecorationRepaint();
     }
 
--- branches/KDE/4.4/kdebase/workspace/kwin/geometry.cpp #1078877:1078878
@@ -2018,7 +2018,6 @@
     
     // keep track of old maximize mode 
     // to detect changes
-    MaximizeMode old_mode( max_mode );
     checkMaximizeGeometry();
     workspace()->checkActiveScreen( this );
     workspace()->updateStackingOrder();
@@ -2028,7 +2027,7 @@
     // - size is changed
     // - maximize mode is changed to MaximizeRestore, when size unchanged
     //   which can happen when untabbing maximized windows
-    if( resized || ( old_mode != max_mode && max_mode == MaximizeRestore ) )
+    if( resized )
         {
         discardWindowPixmap();
         if( scene != NULL )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic