mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
accel-parse: Use libxkbcommon for keysym parsing
This kills our dependency on GTK+ / GDK entirely.
This commit is contained in:
parent
806f1742ac
commit
e70f336a09
@ -26,7 +26,7 @@
|
||||
|
||||
#include "meta-accel-parse.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -297,8 +297,8 @@ accelerator_parse (const gchar *accelerator,
|
||||
}
|
||||
else
|
||||
{
|
||||
keyval = gdk_keyval_from_name (accelerator);
|
||||
if (keyval == GDK_KEY_VoidSymbol)
|
||||
keyval = xkb_keysym_from_name (accelerator, XKB_KEYSYM_CASE_INSENSITIVE);
|
||||
if (keyval == XKB_KEY_NoSymbol)
|
||||
{
|
||||
error = TRUE;
|
||||
goto out;
|
||||
@ -315,7 +315,7 @@ out:
|
||||
keyval = keycode = mods = 0;
|
||||
|
||||
if (accelerator_key)
|
||||
*accelerator_key = gdk_keyval_to_lower (keyval);
|
||||
*accelerator_key = keyval;
|
||||
if (accelerator_keycode)
|
||||
*accelerator_keycode = keycode;
|
||||
if (accelerator_mods)
|
||||
|
Loading…
Reference in New Issue
Block a user