# HG changeset patch # User ib # Date 1314463912 0 # Node ID ab4b48ef5a682ba2f5e12712c2fdd9431a0f4042 # Parent f27fe61c62f7805202e0f2234c45e9f2febdd562 Add a parameter to vo_x11_ewmh_fullscreen(). This allows to control to which window the event shall be sent. diff -r f27fe61c62f7 -r ab4b48ef5a68 gui/wm/ws.c --- 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 diff -r f27fe61c62f7 -r ab4b48ef5a68 libvo/x11_common.c --- 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 diff -r f27fe61c62f7 -r ab4b48ef5a68 libvo/x11_common.h --- 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