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

XCB/window: allow compilation without xcb-keysyms

(cherry picked from commit c7dd9b7ee11d95598e3c0414439b95bd220f7466)
parent 316d142d
......@@ -3333,7 +3333,7 @@ AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb
PKG_CHECK_MODULES(XCB, [xcb])
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"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
......@@ -3367,9 +3367,10 @@ AS_IF([test "${enable_xcb}" != "no"], [
AS_IF([test "${have_xcb_keysyms}" = "yes"], [
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_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
])
VLC_ADD_PLUGIN([xdg_screensaver])
])
......
......@@ -29,15 +29,15 @@
#include <assert.h>
#include <xcb/xcb.h>
#include <vlc_common.h>
#include "xcb_vlc.h"
#ifdef HAVE_XCB_KEYSYMS
#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
#include <X11/XF86keysym.h>
#include <vlc_common.h>
#include <vlc_keys.h>
#include "xcb_vlc.h"
struct key_handler_t
{
vlc_object_t *obj;
......@@ -164,3 +164,27 @@ int ProcessKeyEvent (key_handler_t *ctx, xcb_generic_event_t *ev)
free (ev);
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