JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Make full screen actually full screen and move window so that border is out
authorMarco Peereboom <marco@conformal.com>
Wed, 28 Jan 2009 21:14:08 +0000 (21:14 +0000)
committerMarco Peereboom <marco@conformal.com>
Wed, 28 Jan 2009 21:14:08 +0000 (21:14 +0000)
of sight.

scrotwm.c

index 0e3ab48..fa4d98b 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -1892,15 +1892,16 @@ configurerequest(XEvent *e)
                                win->g.h = ev->height;
                        if (win->ws->r != NULL) {
                                /* this seems to be full screen */
-                               if (win->g.w > WIDTH(win->ws->r)) {
-                                       /* kill border */
-                                       win->g.x -= 1;
-                                       win->g.w += 1;
+                               if (win->g.w >= WIDTH(win->ws->r)) {
+                                       win->g.x = -1;
+                                       win->g.w = WIDTH(win->ws->r);
+                                       ev->value_mask |= CWX | CWWidth;
                                }
-                               if (win->g.h > HEIGHT(win->ws->r)) {
+                               if (win->g.h >= HEIGHT(win->ws->r)) {
                                        /* kill border */
-                                       win->g.y -= 1;
-                                       win->g.h += 1;
+                                       win->g.y = -1;
+                                       win->g.h = HEIGHT(win->ws->r);
+                                       ev->value_mask |= CWY | CWHeight;
                                }
                        }
                        if ((ev->value_mask & (CWX|CWY)) &&