[MPlayer-cvslog] r34025 - in trunk: gui/wm/ws.c libvo/x11_common.c libvo/x11_common.h

ib subversion at mplayerhq.hu
Sat Aug 27 18:51:52 CEST 2011


Author: ib
Date: Sat Aug 27 18:51:52 2011
New Revision: 34025

Log:
Add a parameter to vo_x11_ewmh_fullscreen().

This allows to control to which window the event shall be sent.

Modified:
   trunk/gui/wm/ws.c
   trunk/libvo/x11_common.c
   trunk/libvo/x11_common.h

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Sat Aug 27 13:17:05 2011	(r34024)
+++ trunk/gui/wm/ws.c	Sat Aug 27 18:51:52 2011	(r34025)
@@ -890,7 +890,7 @@ void wsFullScreen(wsTWindow *win)
     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 @@ void wsFullScreen(wsTWindow *win)
         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

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	Sat Aug 27 13:17:05 2011	(r34024)
+++ trunk/libvo/x11_common.c	Sat Aug 27 18:51:52 2011	(r34025)
@@ -141,11 +141,12 @@ static int vo_x11_get_fs_type(int suppor
 /*
  * 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 @@ void vo_x11_ewmh_fullscreen(int action)
         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 @@ void vo_x11_fullscreen(void)
 
     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

Modified: trunk/libvo/x11_common.h
==============================================================================
--- trunk/libvo/x11_common.h	Sat Aug 27 13:17:05 2011	(r34024)
+++ trunk/libvo/x11_common.h	Sat Aug 27 18:51:52 2011	(r34025)
@@ -90,7 +90,7 @@ void vo_x11_clearwindow_part(Display *mD
 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
 


More information about the MPlayer-cvslog mailing list