[vlc-devel] commit: XCB window: set Window Manager hints ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Sep 24 17:49:24 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 24 18:41:24 2009 +0300| [40e092fa7f6f160d9bb1788e7cb242228389f54b] | committer: Rémi Denis-Courmont
XCB window: set Window Manager hints
This is required to ever get the focus with some window managers.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40e092fa7f6f160d9bb1788e7cb242228389f54b
---
modules/video_output/xcb/window.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 57e9b3e..d492255 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -119,6 +119,19 @@ void set_ascii_prop (xcb_connection_t *conn, xcb_window_t window,
set_string (conn, window, atom, XA_STRING, value);
}
+static inline
+void set_wm_hints (xcb_connection_t *conn, xcb_window_t window)
+{
+ static const uint32_t wm_hints[8] = {
+ 3, /* flags: Input, Initial state */
+ 1, /* input: True */
+ 1, /* initial state: Normal */
+ 0, 0, 0, 0, 0, /* Icon */
+ };
+ xcb_change_property (conn, XCB_PROP_MODE_REPLACE, window, XA_WM_HINTS,
+ XA_WM_HINTS, 32, 8, wm_hints);
+}
+
/** Set the Window ICCCM client machine property */
static inline
void set_hostname_prop (xcb_connection_t *conn, xcb_window_t window)
@@ -256,6 +269,7 @@ static int Open (vlc_object_t *obj)
vlc_pgettext ("ASCII", "VLC media player"));
set_ascii_prop (conn, window, XA_WM_ICON_NAME,
vlc_pgettext ("ASCII", "VLC"));
+ set_wm_hints (conn, window);
xcb_change_property (conn, XCB_PROP_MODE_REPLACE, window, XA_WM_CLASS,
XA_STRING, 8, 8, "vlc\0Vlc");
set_hostname_prop (conn, window);
More information about the vlc-devel
mailing list