changeset 33937:ab4b48ef5a68

Add a parameter to vo_x11_ewmh_fullscreen(). This allows to control to which window the event shall be sent.
author ib
date Sat, 27 Aug 2011 16:51:52 +0000
parents f27fe61c62f7
children ef4040496058
files gui/wm/ws.c libvo/x11_common.c libvo/x11_common.h
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/wm/ws.c	Sat Aug 27 11:17:05 2011 +0000
+++ b/gui/wm/ws.c	Sat Aug 27 16:51:52 2011 +0000
@@ -890,7 +890,7 @@
     int decoration = 0;
 
     if (win->isFullScreen) {
-        vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH
+        vo_x11_ewmh_fullscreen(win->WindowID, _NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH
 
         if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs
             win->X      = win->OldX;
@@ -935,7 +935,7 @@
         wsScreenSaverOff(wsDisplay);
 #endif
 
-        vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD); // adds fullscreen state if wm supports EWMH
+        vo_x11_ewmh_fullscreen(win->WindowID, _NET_WM_STATE_ADD); // adds fullscreen state if wm supports EWMH
     }
 
     if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs
--- a/libvo/x11_common.c	Sat Aug 27 11:17:05 2011 +0000
+++ b/libvo/x11_common.c	Sat Aug 27 16:51:52 2011 +0000
@@ -141,11 +141,12 @@
 /*
  * Sends the EWMH fullscreen state event.
  *
+ * win:    id of the window to which the event shall be sent
  * action: could be one of _NET_WM_STATE_REMOVE -- remove state
  *                         _NET_WM_STATE_ADD    -- add state
  *                         _NET_WM_STATE_TOGGLE -- toggle
  */
-void vo_x11_ewmh_fullscreen(int action)
+void vo_x11_ewmh_fullscreen(Window win, int action)
 {
     assert(action == _NET_WM_STATE_REMOVE ||
            action == _NET_WM_STATE_ADD || action == _NET_WM_STATE_TOGGLE);
@@ -159,7 +160,7 @@
         xev.xclient.serial = 0;
         xev.xclient.send_event = True;
         xev.xclient.message_type = XA_NET_WM_STATE;
-        xev.xclient.window = vo_window;
+        xev.xclient.window = win;
         xev.xclient.format = 32;
         xev.xclient.data.l[0] = action;
         xev.xclient.data.l[1] = XA_NET_WM_STATE_FULLSCREEN;
@@ -1369,12 +1370,12 @@
 
     if (vo_fs)
     {
-        vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE);   // removes fullscreen state if wm supports EWMH
+        vo_x11_ewmh_fullscreen(vo_window, _NET_WM_STATE_REMOVE);   // removes fullscreen state if wm supports EWMH
         vo_fs = VO_FALSE;
     } else
     {
         // win->fs
-        vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD);      // sends fullscreen state to be added if wm supports EWMH
+        vo_x11_ewmh_fullscreen(vo_window, _NET_WM_STATE_ADD);      // sends fullscreen state to be added if wm supports EWMH
 
         vo_fs = VO_TRUE;
         if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // not needed with EWMH fs
--- a/libvo/x11_common.h	Sat Aug 27 11:17:05 2011 +0000
+++ b/libvo/x11_common.h	Sat Aug 27 16:51:52 2011 +0000
@@ -90,7 +90,7 @@
 void vo_x11_clearwindow( Display *mDisplay, Window vo_window );
 void vo_x11_ontop(void);
 void vo_x11_border(void);
-void vo_x11_ewmh_fullscreen( int action );
+void vo_x11_ewmh_fullscreen( Window win, int action );
 
 #endif