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

XCB/window: allow compilation without xcb-keysyms

parent 73339d95
...@@ -3314,7 +3314,7 @@ AS_IF([test "${enable_xcb}" != "no"], [ ...@@ -3314,7 +3314,7 @@ AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb dnl libxcb
PKG_CHECK_MODULES(XCB, [xcb]) PKG_CHECK_MODULES(XCB, [xcb])
PKG_CHECK_MODULES(XCB_SHM, [xcb-shm]) PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
VLC_ADD_PLUGIN([screensaver xcb_x11 xcb_screen xcb_apps]) VLC_ADD_PLUGIN([screensaver xcb_x11 xcb_window xcb_screen xcb_apps])
AS_IF([test "${enable_xvideo}" != "no"], [ AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [ PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
...@@ -3348,9 +3348,10 @@ AS_IF([test "${enable_xcb}" != "no"], [ ...@@ -3348,9 +3348,10 @@ AS_IF([test "${enable_xcb}" != "no"], [
AS_IF([test "${have_xcb_keysyms}" = "yes"], [ AS_IF([test "${have_xcb_keysyms}" = "yes"], [
PKG_CHECK_MODULES(XPROTO, [xproto]) PKG_CHECK_MODULES(XPROTO, [xproto])
VLC_ADD_PLUGIN([xcb_window globalhotkeys]) VLC_ADD_PLUGIN([globalhotkeys])
VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}]) VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}]) VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
]) ])
VLC_ADD_PLUGIN([xdg_screensaver]) VLC_ADD_PLUGIN([xdg_screensaver])
]) ])
......
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
#include <assert.h> #include <assert.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <vlc_common.h>
#include "xcb_vlc.h"
#ifdef HAVE_XCB_KEYSYMS
#include <xcb/xcb_keysyms.h> #include <xcb/xcb_keysyms.h>
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/XF86keysym.h> #include <X11/XF86keysym.h>
#include <vlc_common.h>
#include <vlc_keys.h> #include <vlc_keys.h>
#include "xcb_vlc.h"
struct key_handler_t struct key_handler_t
{ {
vlc_object_t *obj; vlc_object_t *obj;
...@@ -164,3 +164,27 @@ int ProcessKeyEvent (key_handler_t *ctx, xcb_generic_event_t *ev) ...@@ -164,3 +164,27 @@ int ProcessKeyEvent (key_handler_t *ctx, xcb_generic_event_t *ev)
free (ev); free (ev);
return 0; return 0;
} }
#else /* HAVE_XCB_KEYSYMS */
key_handler_t *CreateKeyHandler (vlc_object_t *obj, xcb_connection_t *conn)
{
msg_Err (obj, "X11 key press support not compiled-in");
(void) conn;
return NULL;
}
void DestroyKeyHandler (key_handler_t *ctx)
{
(void) ctx;
abort ();
}
int ProcessKeyEvent (key_handler_t *ctx, xcb_generic_event_t *ev)
{
(void) ctx;
(void) ev;
abort ();
}
#endif /* HAVE_XCB_KEYSYMS */
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