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

XCB/window: legacy non-Unicode key symbols

parent 4090e067
...@@ -53,7 +53,7 @@ libxcb_glx_plugin_la_LIBADD = $(AM_LIBADD) \ ...@@ -53,7 +53,7 @@ libxcb_glx_plugin_la_LIBADD = $(AM_LIBADD) \
$(XLIB_XCB_LIBS) $(GL_LIBS) $(XLIB_XCB_LIBS) $(GL_LIBS)
libxcb_glx_plugin_la_DEPENDENCIES = libxcb_glx_plugin_la_DEPENDENCIES =
libxcb_window_plugin_la_SOURCES = xcb/window.c xcb/keys.c libxcb_window_plugin_la_SOURCES = xcb/window.c xcb/keys.c xcb/keysym.h
libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \ libxcb_window_plugin_la_CFLAGS = $(AM_CFLAGS) \
$(XPROTO_CFLAGS) \ $(XPROTO_CFLAGS) \
$(XCB_CFLAGS) \ $(XCB_CFLAGS) \
......
...@@ -173,6 +173,8 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym) ...@@ -173,6 +173,8 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym)
{ XF86XK_Favorites, KEY_BROWSER_FAVORITES, }, { XF86XK_Favorites, KEY_BROWSER_FAVORITES, },
{ XF86XK_AudioPause, KEY_MEDIA_PLAY_PAUSE, }, { XF86XK_AudioPause, KEY_MEDIA_PLAY_PAUSE, },
{ XF86XK_Reload, KEY_BROWSER_REFRESH, }, { XF86XK_Reload, KEY_BROWSER_REFRESH, },
}, old[] = {
#include "keysym.h"
}; };
/* X11 Latin-1 range */ /* X11 Latin-1 range */
...@@ -187,6 +189,11 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym) ...@@ -187,6 +189,11 @@ static uint_fast32_t ConvertKeySym (xcb_keysym_t sym)
keysymcmp); keysymcmp);
if (res != NULL) if (res != NULL)
return res->vlc; return res->vlc;
/* Legacy X11 symbols outside the Unicode range */
res = bsearch (&sym, old, sizeof (old) / sizeof (old[0]), sizeof (old[0]),
keysymcmp);
if (res != NULL)
return res->vlc;
return KEY_UNSET; return KEY_UNSET;
} }
......
This diff is collapsed.
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