changeset 3174:5065458b72ff

Fixed #279: Updated check in fullscreen toggle for broken fullscreen windows
author unexist
date Sat, 14 Jan 2012 16:46:20 +0100
parents fbe5a1f65fae
children 3049382ee3fe
files src/subtle/client.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/client.c	Sat Jan 14 16:43:38 2012 +0100
+++ b/src/subtle/client.c	Sat Jan 14 16:46:20 2012 +0100
@@ -1225,14 +1225,22 @@
       /* Set fullscreen mode */
       if(flag & SUB_CLIENT_MODE_FULL)
         {
-          /* Exclude fixed windows from fullscreen mode */
+          /* Normally, you'd expect, that a fixed size window wants to keep
+           * the size. Apparently, some broken clients just violate that, so we
+           * exclude fixed windows with min != screen size from fullscreen */
           if(c->flags & SUB_CLIENT_MODE_FIXED)
             {
-              c->flags &= ~SUB_CLIENT_MODE_FULL;
+              SubScreen *s = SCREEN(subtle->screens->data[c->screenid]);
 
-              return;
+              if(s->base.width != c->minw || s->base.height != c->minh)
+                {
+                  c->flags &= ~SUB_CLIENT_MODE_FULL;
+
+                  return;
+                }
             }
-          else XSetWindowBorderWidth(subtle->dpy, c->win, 0);
+
+          XSetWindowBorderWidth(subtle->dpy, c->win, 0);
         }
 
       /* Set floating or zaphod or borderless mode */