The third and fourth arguments to CompRect's constructor are width and
height, not lower-right corner. This breaks handling of
_NET_WM_FULLSCREEN_MONITORS when the top-left corner of the
fullscreened window isn't (0, 0).
---
 src/window.cpp |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/window.cpp b/src/window.cpp
index 2eef8cc..e5cc356 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -454,15 +454,14 @@ PrivateWindow::setFullscreenMonitors 
(CompFullscreenMonitorSet *monitors)
        (unsigned int) monitors->top    < outputs &&
        (unsigned int) monitors->bottom < outputs)
     {
-       CompRect fsRect (screen->outputDevs ()[monitors->left].x1 (),
-                        screen->outputDevs ()[monitors->top].y1 (),
-                        screen->outputDevs ()[monitors->right].x2 (),
-                        screen->outputDevs ()[monitors->bottom].y2 ());
-
-       if (fsRect.x1 () < fsRect.x2 () && fsRect.y1 () < fsRect.y2 ())
+        int x1 = screen->outputDevs ()[monitors->left].x1 (),
+            x2 = screen->outputDevs ()[monitors->right].x2 (),
+            y1 = screen->outputDevs ()[monitors->top].y1 (),
+            y2 = screen->outputDevs ()[monitors->bottom].y2 ();
+       if (x1 < x2 && y1 < y2)
        {
            fullscreenMonitorsSet = true;
-           fullscreenMonitorRect = fsRect;
+           fullscreenMonitorRect = CompRect (x1, y1, x2 - x1, y2 - y1);
        }
     }
 
-- 
1.7.5.4

_______________________________________________
dev mailing list
[email protected]
http://lists.compiz.org/mailman/listinfo/dev

Reply via email to