Problems with NET_WM_STATE_FULLSCREEN

Arwed von Merkatz v.merkatz at gmx.net
Sat Oct 4 12:23:48 CEST 2003


Hi,

i found two problems with the handling of NET_WM_STATE_FULLSCREEN
windows in xfwm4 4.0.0, both exposed by gst-player (www.gstreamer.net).

1. when going fullscreen, gst-player relies on the
NET_WM_STATE_FULLSCREEN flag being set when it receives a configure
event to determine whether it should show its menu bar or not. XFwm4
sets the state after sending the configure event, so gst-players menu
bar is still shown in fullscreen mode. The attached set-state.patch
fixes this, i don't think that could lead to negative side effects (i
haven't noticed any :)

2. when starting to play a video in fullscreen mode, gst-player creates
a new xvideo window and reparents that into the existing window. Doing
this it requests a minimum size for the window and expects to get the
full screen size allocated (it doesn't know about the size of the full
screen, so it can't request it). The attached ignore-request-size.patch
fixes this by ignoring the requested size for windows that have the
FULLSCREEN flag set, allocating them the whole screen size. I used the
MyDisplayFullWidth and MyDisplayFullHeight functions there, which works
fine here, but do those work for xinerama setups?

-- 
Arwed v. Merkatz
Grimoire Guru for video
Grimoire Guru for xfce
Sourcemage GNU/Linux
http://www.sourcemage.org
-------------- next part --------------
diff -Nur xfwm4-4.0.0.orig/src/client.c xfwm4-4.0.0/src/client.c
--- xfwm4-4.0.0.orig/src/client.c	2003-10-04 12:01:19.000000000 +0200
+++ xfwm4-4.0.0/src/client.c	2003-10-04 12:05:04.000000000 +0200
@@ -4336,6 +4336,7 @@
         wc.height = c->fullscreen_old_height;
         layer = c->fullscreen_old_layer;
     }
+    clientSetNetState (c);
     if (CLIENT_FLAG_TEST (c, CLIENT_FLAG_MANAGED))
     {
         clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, CFG_NONE);
@@ -4347,7 +4348,6 @@
         c->height = wc.height;
         c->width = wc.width;
     }
-    clientSetNetState (c);
     clientSetLayer (c, layer);
 }
 
-------------- next part --------------
diff -Nur xfwm4-4.0.0.orig/src/events.c xfwm4-4.0.0/src/events.c
--- xfwm4-4.0.0.orig/src/events.c	2003-10-04 12:01:19.000000000 +0200
+++ xfwm4-4.0.0/src/events.c	2003-10-04 12:04:09.000000000 +0200
@@ -1044,6 +1044,12 @@
             /* Ignore stacking request for DESKTOP windows */
             ev->value_mask &= ~(CWSibling | CWStackMode);
         }
+        if (CLIENT_FLAG_TEST (c, CLIENT_FLAG_FULLSCREEN))
+        {
+            /* Ignore requested size for FULLSCREEN windows */
+            wc.width = MyDisplayFullWidth (dpy, screen);
+            wc.height = MyDisplayFullHeight (dpy, screen);
+        }
         clientCoordGravitate (c, APPLY, &wc.x, &wc.y);
         /* Clean up buggy requests that set all flags */
         if ((ev->value_mask & CWX) && (wc.x == c->x))


More information about the Xfce4-dev mailing list