Fix #2707: Set fullscreen first
authorArmin Novak <armin.novak@thincast.com>
Mon, 19 Mar 2018 10:54:06 +0000 (11:54 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 19 Mar 2018 10:54:06 +0000 (11:54 +0100)
Due to kwin bug https://bugs.kde.org/show_bug.cgi?id=391960
multimonitor fullscreen is not applied correctly with the
previous approach.

client/X11/xf_window.c

index a84f0c0..406d51c 100644 (file)
@@ -196,17 +196,6 @@ void xf_SetWindowFullscreen(xfContext* xfc, xfWindow* window, BOOL fullscreen)
 
        if (xfc->_NET_WM_FULLSCREEN_MONITORS != None)
        {
-               /* Set monitor bounds */
-               if (settings->MonitorCount > 1)
-               {
-                       xf_SendClientEvent(xfc, window->handle, xfc->_NET_WM_FULLSCREEN_MONITORS, 5,
-                                          xfc->fullscreenMonitors.top,
-                                          xfc->fullscreenMonitors.bottom,
-                                          xfc->fullscreenMonitors.left,
-                                          xfc->fullscreenMonitors.right,
-                                          1);
-               }
-
                xf_ResizeDesktopWindow(xfc, window, width, height);
 
                if (fullscreen)
@@ -225,6 +214,17 @@ void xf_SetWindowFullscreen(xfContext* xfc, xfWindow* window, BOOL fullscreen)
                        /* leave full screen: move the window after removing NET_WM_STATE_FULLSCREEN */
                        XMoveWindow(xfc->display, window->handle, startX, startY);
                }
+
+               /* Set monitor bounds */
+               if (settings->MonitorCount > 1)
+               {
+                       xf_SendClientEvent(xfc, window->handle, xfc->_NET_WM_FULLSCREEN_MONITORS, 5,
+                                          xfc->fullscreenMonitors.top,
+                                          xfc->fullscreenMonitors.bottom,
+                                          xfc->fullscreenMonitors.left,
+                                          xfc->fullscreenMonitors.right,
+                                          1);
+               }
        }
        else
        {