From 34ff3e1fe027b4005c284fcaf5235e6686cf35fc Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan@xfce.org>
Date: Mon, 24 Jun 2019 18:49:45 +0200
Subject: [PATCH] client: ignore configure requests when maximized

Bug: 13954

Some clients tend to send us a configure request when transitioning to
maximized, which introduces a race condition because the window manager
will remove the maximized flag when the client resizes itself, now that
we allow for that since commit aee8b25a.

Ignore the configure size request from the client when maximized or
fullscreen to work around such behavior from the client.

Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
---
 src/client.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index 3bb7a7f10..a34408fc0 100644
--- a/src/client.c
+++ b/src/client.c
@@ -884,7 +884,9 @@ clientMoveResizeWindow (Client *c, XWindowChanges * wc, unsigned long mask)
         /* Ignore stacking request for DESKTOP windows */
         mask &= ~(CWSibling | CWStackMode);
     }
-    if (FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
+    if (FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN)
+        || (FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED)
+            && (c->screen_info->params->borderless_maximize)))
     {
         /* Not allowed in fullscreen mode */
         mask &= ~(CWX | CWY | CWWidth | CWHeight);
-- 
GitLab