send _NET_WM_STATE_FULLSCREEN to the WM

Tomas carnecky tom at dbservice.com
Sun Apr 24 08:39:54 CDT 2005


these two patches send the _NET_WM_STATE_FULLSCREEN hint to the WM. 
obviously it should only happen when we are in fullscreen mode, but I 
don't know how to check it, so I've put it into 
X11DRV_create_whole_window().

Some WM don't let you position your windows to an arbitrary position, 
for example metacity doesn't let you move the windows past the top 
panel, and makes it impossible to create a window that covers the whole 
screen (fullscreen app). The hint makes sure the WM lets you put the 
window over the whole screen, and also lets you minimize/maximize the 
window properly using key bindings (in metacity: alt+F11).

a similar patch to this was sent to the wine-devel mailing list about a 
year ago, but was never included into cvs.


Index: ./dlls/x11drv/x11drv.h
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11drv.h,v
retrieving revision 1.72
diff -u -r1.72 x11drv.h
--- ./dlls/x11drv/x11drv.h21 Apr 2005 17:31:50 -00001.72
+++ ./dlls/x11drv/x11drv.h23 Apr 2005 16:17:41 -0000
@@ -571,6 +571,8 @@
      XATOM__NET_WM_NAME,
      XATOM__NET_WM_WINDOW_TYPE,
      XATOM__NET_WM_WINDOW_TYPE_UTILITY,
+    XATOM__NET_WM_STATE,
+    XATOM__NET_WM_STATE_FULLSCREEN,
      XATOM_XdndAware,
      XATOM_XdndEnter,
      XATOM_XdndPosition,

Index: ./dlls/x11drv/window.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/window.c,v
retrieving revision 1.107
diff -u -r1.107 window.c
--- ./dlls/x11drv/window.c31 Mar 2005 15:44:20 -00001.107
+++ ./dlls/x11drv/window.c23 Apr 2005 16:17:46 -0000
@@ -82,6 +82,8 @@
      "_NET_WM_NAME",
      "_NET_WM_WINDOW_TYPE",
      "_NET_WM_WINDOW_TYPE_UTILITY",
+    "_NET_WM_STATE",
+    "_NET_WM_STATE_FULLSCREEN",
      "XdndAware",
      "XdndEnter",
      "XdndPosition",
@@ -637,6 +639,11 @@
              }
          }
      }
+
+    Atom newstate = x11drv_atom(_NET_WM_STATE_FULLSCREEN);
+    TRACE("setting state to _NET_WM_STATE_FULLSCREEN\n");
+    XChangeProperty( display, data->whole_window,
+                     x11drv_atom(_NET_WM_STATE),
+                     XA_ATOM, 32, PropModeReplace,
+                     (unsigned char*)&newstate, 1 );

      if (mask)
      {



More information about the wine-patches mailing list