diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 7a3b829fd..11827f467 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -499,11 +499,21 @@ display_get_keybinding (MetaDisplay *display, return NULL; } -static MetaKeyBindingAction -display_get_keybinding_action (MetaDisplay *display, - unsigned int keysym, - unsigned int keycode, - unsigned long mask) +/** + * meta_display_get_keybinding_action: + * @display: A #MetaDisplay + * @keysym: Key symbol + * @keycode: Raw keycode + * @mask: Event mask + * + * Returns: The action that should be taken for the given key, or %META_KEYBINDING_ACTION_NONE. + * + */ +MetaKeyBindingAction +meta_display_get_keybinding_action (MetaDisplay *display, + unsigned int keysym, + unsigned int keycode, + unsigned long mask) { MetaKeyBinding *binding; @@ -2756,10 +2766,10 @@ process_workspace_switch_grab (MetaDisplay *display, MetaWorkspace *target_workspace; MetaKeyBindingAction action; - action = display_get_keybinding_action (display, - keysym, - event->xkey.keycode, - display->grab_mask); + action = meta_display_get_keybinding_action (display, + keysym, + event->xkey.keycode, + display->grab_mask); switch (action) { diff --git a/src/include/display.h b/src/include/display.h index c0a0f0ded..c30e6aecb 100644 --- a/src/include/display.h +++ b/src/include/display.h @@ -26,6 +26,7 @@ #include #include "types.h" +#include "prefs.h" #include "common.h" typedef enum @@ -117,6 +118,10 @@ void meta_display_end_grab_op (MetaDisplay *display, MetaGrabOp meta_display_get_grab_op (MetaDisplay *display); +MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay *display, + unsigned int keysym, + unsigned int keycode, + unsigned long mask); /* meta_display_set_input_focus_window is like XSetInputFocus, except * that (a) it can't detect timestamps later than the current time,