Commit f9e0558e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: remove hotkeys from video output

The window provider can take care of this (tested with Qt4 and XCB
window). X11 forwards unhandled events to ancestor windows.
parent 08b5947d
......@@ -30,16 +30,15 @@ XCB_KEYSYMS_LIBS = -lxcb-keysyms
libxcb_plugin_la_SOURCES = \
xcb/xcb_vlc.h \
xcb/xcb.c \
xcb/events.c \
xcb/keys.c
xcb/events.c
libxcb_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XCB_CFLAGS) $(XCB_SHM) \
$(XPROTO_CFLAGS) \
$(XCB_AUX_CFLAGS) $(XCB_IMAGE_CFLAGS) $(XCB_KEYSYMS_CFLAGS)
$(XCB_AUX_CFLAGS) $(XCB_IMAGE_CFLAGS)
libxcb_plugin_la_LIBADD = $(AM_LIBADD) \
$(XCB_LIBS) $(XCB_SHM) \
$(XPROTO_LIBS) \
$(XCB_AUX_LIBS) $(XCB_IMAGE_LIBS) $(XCB_KEYSYMS_LIBS)
$(XCB_AUX_LIBS) $(XCB_IMAGE_LIBS)
libxcb_plugin_la_DEPENDENCIES =
libxcb_window_plugin_la_SOURCES = xcb/window.c xcb/keys.c
......
......@@ -76,7 +76,6 @@ struct vout_sys_t
xcb_connection_t *conn;
xcb_screen_t *screen;
vout_window_t *embed; /* VLC window (when windowed) */
key_handler_t *keys;
xcb_visualid_t vid;
xcb_window_t parent; /* parent X window */
......@@ -193,9 +192,6 @@ static int Open (vlc_object_t *obj)
}
}
/* Prefetch keyboard mappings */
p_sys->keys = CreateKeyHandler (obj, p_sys->conn);
vout->pf_init = Init;
vout->pf_end = Deinit;
vout->pf_display = Display;
......@@ -217,8 +213,6 @@ static void Close (vlc_object_t *obj)
vout_sys_t *p_sys = vout->p_sys;
assert (p_sys->embed == NULL);
if (p_sys->keys)
DestroyKeyHandler (p_sys->keys);
if (p_sys->conn)
xcb_disconnect (p_sys->conn);
free (p_sys);
......@@ -441,7 +435,6 @@ static int Init (vout_thread_t *vout)
/* XCB_CW_BACK_PIXEL */
screen->black_pixel,
/* XCB_CW_EVENT_MASK */
XCB_EVENT_MASK_KEY_PRESS |
XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_POINTER_MOTION,
};
......@@ -541,11 +534,7 @@ static int Manage (vout_thread_t *vout)
xcb_generic_event_t *ev;
while ((ev = xcb_poll_for_event (p_sys->conn)) != NULL)
{
if (p_sys->keys && (ProcessKeyEvent (p_sys->keys, ev) == 0))
continue;
ProcessEvent (vout, ev);
}
if (xcb_connection_has_error (p_sys->conn))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment