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

List:       kde-commits
Subject:    [kde-workspace] kwin: sanitize geom_restore if the window gets quickly untiled after initially being
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2012-04-30 20:38:03
Message-ID: 20120430203803.3BAB2A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit e1854596d6703462d0c2b4643ccddaa95bcbc4f9 by Thomas Lübking.
Committed on 24/04/2012 at 20:17.
Pushed by luebking into branch 'master'.

sanitize geom_restore if the window gets quickly untiled after initially being \
maximized

BUG: 298646
REVIEW: 104715
FIXED-IN: 4.9

M  +3    -0    kwin/geometry.cpp

http://commits.kde.org/kde-workspace/e1854596d6703462d0c2b4643ccddaa95bcbc4f9

diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index a79e940..4da7d29 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -2246,6 +2246,7 @@ void Client::changeMaximize(bool vertical, bool horizontal, \
bool adjust)  restore.moveLeft(geom_restore.x());
             if (geom_restore.height() > 0)
                 restore.moveTop(geom_restore.y());
+            geom_restore = restore; // relevant for mouse pos calculation, bug \
#298646  }
         setGeometry(restore, geom_mode);
         if (!clientArea.contains(geom_restore.center()))    // Not restoring to the \
same screen @@ -3137,6 +3138,8 @@ void Client::setQuickTileMode(QuickTileMode mode, \
bool keyboard)  // is the same as explicitly untiling this window, so allow it.
     if (mode == QuickTileNone || ((quick_tile_mode & QuickTileHorizontal) && (mode & \
QuickTileHorizontal))) {  // Untiling, so just restore geometry, and we're done.
+        if (!geom_restore.isValid()) // invalid if we started maximized and wait for \
placement +            geom_restore = geometry();
         setGeometry(geom_restore);
         quick_tile_mode = QuickTileNone;
         checkWorkspacePosition(); // Just in case it's a different screen


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

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