From 3c0e7a82e5952e3504a74344ba52c3ce88d97d38 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Mon, 2 Jan 2006 21:27:23 +0000
Subject: [PATCH] Fix fullscreen for legacy apps

(Old svn revision: 19275)
---
 src/client.c    | 6 +++---
 src/placement.c | 7 ++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/client.c b/src/client.c
index b0fc3ab55..1d543255e 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1692,9 +1692,9 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
     clientGetNetStruts (c);
 
     /* Fullscreen for older legacy apps */
-    if ((c->x == 0) && (c->y == 0) &&
-        (c->width == gdk_screen_get_width (screen_info->gscr)) &&
-        (c->height == gdk_screen_get_height (screen_info->gscr)) &&
+    if ((c->x <= 0) && (c->y <= 0) &&
+        (c->width >= gdk_screen_get_width (screen_info->gscr)) &&
+        (c->height >= gdk_screen_get_height (screen_info->gscr)) &&
         !FLAG_TEST(c->xfwm_flags, XFWM_FLAG_HAS_BORDER) &&
         (c->win_layer == WIN_LAYER_NORMAL) &&
         (c->type == WINDOW_NORMAL))
diff --git a/src/placement.c b/src/placement.c
index 40d4f1429..92578cada 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -682,5 +682,10 @@ clientInitPosition (Client * c)
             smartPlacement (c, full_x, full_y, full_w, full_h);
         }
     }
-    clientAutoMaximize (c, full_w, full_h);
+
+    if (!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN) && 
+        !FLAG_TEST (c->xfwm_flags, XFWM_FLAG_LEGACY_FULLSCREEN))
+    {
+        clientAutoMaximize (c, full_w, full_h);
+    }
 }
-- 
GitLab