From 5361e0259f8862f8d462ad9a676af68dd8607c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 13 Mar 2012 16:07:59 +0100 Subject: [PATCH] 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 --- src/core/display.c | 13 +++++++++++++ src/meta/display.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index 267903c27..5a5b8ad56 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -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 diff --git a/src/meta/display.h b/src/meta/display.h index a9edc003d..d68984f32 100644 --- a/src/meta/display.h +++ b/src/meta/display.h @@ -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,