mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -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 "meta-accel-parse.h"
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -297,8 +297,8 @@ accelerator_parse (const gchar *accelerator,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
keyval = gdk_keyval_from_name (accelerator);
|
keyval = xkb_keysym_from_name (accelerator, XKB_KEYSYM_CASE_INSENSITIVE);
|
||||||
if (keyval == GDK_KEY_VoidSymbol)
|
if (keyval == XKB_KEY_NoSymbol)
|
||||||
{
|
{
|
||||||
error = TRUE;
|
error = TRUE;
|
||||||
goto out;
|
goto out;
|
||||||
@ -315,7 +315,7 @@ out:
|
|||||||
keyval = keycode = mods = 0;
|
keyval = keycode = mods = 0;
|
||||||
|
|
||||||
if (accelerator_key)
|
if (accelerator_key)
|
||||||
*accelerator_key = gdk_keyval_to_lower (keyval);
|
*accelerator_key = keyval;
|
||||||
if (accelerator_keycode)
|
if (accelerator_keycode)
|
||||||
*accelerator_keycode = keycode;
|
*accelerator_keycode = keycode;
|
||||||
if (accelerator_mods)
|
if (accelerator_mods)
|
||||||
|
Loading…
Reference in New Issue
Block a user