display: Add accessor function for ignored_modifier_mask

Some modifiers like NumLock and ScrollLock don't make sense in
keybindings, which is why we ignore them when matching keybindings
to events. We should do the same in Javascript, so add an accessor
function.

https://bugzilla.gnome.org/show_bug.cgi?id=665215
This commit is contained in:
Florian Müllner 2012-03-13 16:07:59 +01:00
parent 04bf73ff6d
commit 5361e0259f
2 changed files with 15 additions and 0 deletions

View File

@ -1406,6 +1406,19 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display)
return timestamp;
}
/**
* meta_display_get_ignored_modifier_mask:
* @display: a #MetaDisplay
*
* Returns: a mask of modifiers that should be ignored
* when matching keybindings to events
*/
unsigned int
meta_display_get_ignored_modifier_mask (MetaDisplay *display)
{
return display->ignored_modifier_mask;
}
/**
* meta_display_add_ignored_crossing_serial:
* @display: a #MetaDisplay

View File

@ -91,6 +91,8 @@ guint32 meta_display_get_last_user_time (MetaDisplay *display);
guint32 meta_display_get_current_time (MetaDisplay *display);
guint32 meta_display_get_current_time_roundtrip (MetaDisplay *display);
unsigned int meta_display_get_ignored_modifier_mask (MetaDisplay *display);
GList* meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,