From c4186c571f92b1366b3723a834eadd74c23f7eef Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Tue, 30 Sep 2008 16:37:35 +0000
Subject: [PATCH] Fix NET_WM_STATE claiming maximization vertical and
 horizontal even if only horizontal of vertical is actually set (Should fix
 bug #3969)

(Old svn revision: 27995)
---
 src/netwm.c     |  2 +-
 src/placement.c | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/netwm.c b/src/netwm.c
index cc12ccbf3..3c77c56b0 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -89,7 +89,7 @@ clientSetNetState (Client * c)
         TRACE ("clientSetNetState : skip_taskbar");
         data[i++] = display_info->atoms[NET_WM_STATE_SKIP_TASKBAR];
     }
-    if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
+    if (FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED))
     {
         TRACE ("clientSetNetState : maximize vert + horiz");
         data[i++] = display_info->atoms[NET_WM_STATE_MAXIMIZED_HORZ];
diff --git a/src/placement.c b/src/placement.c
index 0eb2241d1..a554a1d04 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -517,18 +517,18 @@ clientAutoMaximize (Client * c, int full_w, int full_h)
     if (!FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ) &&
         (frameWidth (c) > full_w))
     {
-        g_warning ("The application \"%s\" has requested a window width "
-                   "(%u) larger than the actual width available in the workspace (%u), "
-                   "the window will be maximized horizontally.", c->name, frameWidth (c), full_w);
+        TRACE ("The application \"%s\" has requested a window width "
+               "(%u) larger than the actual width available in the workspace (%u), "
+               "the window will be maximized horizontally.", c->name, frameWidth (c), full_w);
         FLAG_SET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ);
     }
 
     if (!FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_VERT) &&
         (frameHeight (c) > full_h))
     {
-        g_warning ("The application \"%s\" has requested a window height "
-                   "(%u) larger than the actual height available in the workspace (%u), "
-                   "the window will be maximized vertically.", c->name, frameHeight (c), full_h);
+        TRACE ("The application \"%s\" has requested a window height "
+               "(%u) larger than the actual height available in the workspace (%u), "
+               "the window will be maximized vertically.", c->name, frameHeight (c), full_h);
         FLAG_SET (c->flags, CLIENT_FLAG_MAXIMIZED_VERT);
     }
 }
-- 
GitLab