mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
keysyms: Update the macros to CLUTTER_KEY_*
The keysyms defines in clutter-keysyms.h are generated from the X11 key symbols headers by doing the equivalent of a pass of sed from XK_* to CLUTTER_*. This might lead to namespace collisions, down the road. Instead, we should use the CLUTTER_KEY_* namespace. This commit includes the script, taken from GDK, that parses the X11 key symbols and generates two headers: - clutter-keysyms.h: the default included header, with CLUTTER_KEY_* - clutter-keysyms-compat.h: the compatibility header, with CLUTTER_* The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is not defined - essentially deprecating all the old key symbols. This does not change any ABI and, assuming that an application or library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source compatibility is still guaranteed.
This commit is contained in:
@ -316,7 +316,11 @@ key_release_cb (ClutterActor *actor,
|
||||
ClutterEvent *event,
|
||||
void *user_data)
|
||||
{
|
||||
if (event->key.keyval == CLUTTER_Q || event->key.keyval == CLUTTER_q)
|
||||
guint keysym = clutter_event_get_key_symbol (event);
|
||||
ClutterModifierType mods = clutter_event_get_state (event);
|
||||
|
||||
if (keysym == CLUTTER_KEY_q ||
|
||||
((mods & CLUTTER_SHIFT_MASK) && keysym == CLUTTER_KEY_q))
|
||||
clutter_main_quit ();
|
||||
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user