[vlc-devel] commit: xcb_window: implement fullscreen mode ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Aug 11 19:38:20 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 11 20:03:51 2009 +0300| [051d673dda59a636a4dfb7539b6b9e45d29a62fc] | committer: Rémi Denis-Courmont
xcb_window: implement fullscreen mode
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=051d673dda59a636a4dfb7539b6b9e45d29a62fc
---
modules/video_output/xcb/window.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index e6ea1e3..3ccd063 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -75,7 +75,7 @@ struct vout_window_sys_t
xcb_window_t root;
xcb_atom_t wm_state;
xcb_atom_t wm_state_above;
- /*xcb_atom_t wmstate_fullscreen;*/
+ xcb_atom_t wm_state_fullscreen;
};
/** Set an X window property from a nul-terminated string */
@@ -245,13 +245,15 @@ static int Open (vlc_object_t *obj)
set_string (conn, window, utf8, net_wm_icon_name, _("VLC"));
/* Cache any EWMH atom we may need later */
- xcb_intern_atom_cookie_t wm_state_ck, wm_state_above_ck;
+ xcb_intern_atom_cookie_t wm_state_ck, wm_state_above_ck, wm_state_fs_ck;
wm_state_ck = intern_string (conn, "_NET_WM_STATE");
wm_state_above_ck = intern_string (conn, "_NET_WM_STATE_ABOVE");
+ wm_state_fs_ck = intern_string (conn, "_NET_WM_STATE_FULLSCREEN");
p_sys->wm_state = get_atom (conn, wm_state_ck);
p_sys->wm_state_above = get_atom (conn, wm_state_above_ck);
+ p_sys->wm_state_fullscreen = get_atom (conn, wm_state_fs_ck);
/* Create the event thread. It will dequeue all events, so any checked
* request from this thread must be completed at this point. */
@@ -373,23 +375,22 @@ static int Control (vout_window_t *wnd, int cmd, va_list ap)
xcb_configure_window (conn, wnd->handle.xid,
XCB_CONFIG_WINDOW_WIDTH |
XCB_CONFIG_WINDOW_HEIGHT, values);
- xcb_flush (conn);
break;
}
case VOUT_WINDOW_SET_ON_TOP:
- {
- bool on = va_arg (ap, int);
+ set_wm_state (wnd, va_arg (ap, int), p_sys->wm_state_above);
+ break;
- set_wm_state (wnd, on, p_sys->wm_state_above);
- xcb_flush (p_sys->conn);
- return VLC_SUCCESS;
- }
+ case VOUT_WINDOW_SET_FULLSCREEN:
+ set_wm_state (wnd, va_arg (ap, int), p_sys->wm_state_fullscreen);
+ break;
default:
msg_Err (wnd, "request %d not implemented", cmd);
return VLC_EGENERIC;
}
+ xcb_flush (p_sys->conn);
return VLC_SUCCESS;
}
More information about the vlc-devel
mailing list