mirror of
https://github.com/brl/mutter.git
synced 2025-08-06 00:24:42 +00:00
Add support for a "meta key" which initiates extended WM operations
This patch adds the concept of a special key for WM operations, and the default is Super_L, which on extended PC hardware is the "Windows key". What we do is handle the special case of a press and release of this key (without any other intervening keys). Super_L+<key> should still be passed to applications. In the future we may want to also take some of these keybindings (e.g. Super+TAB) though. http://bugzilla.gnome.org/show_bug.cgi?id=563047
This commit is contained in:

committed by
Owen W. Taylor

parent
c4a4de0056
commit
514d00698d
@@ -129,6 +129,15 @@ typedef struct
|
||||
|
||||
G_DEFINE_TYPE(MetaDisplay, meta_display, G_TYPE_OBJECT);
|
||||
|
||||
/* Signals */
|
||||
enum
|
||||
{
|
||||
OVERLAY_KEY,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint display_signals [LAST_SIGNAL] = { 0 };
|
||||
|
||||
/**
|
||||
* The display we're managing. This is a singleton object. (Historically,
|
||||
* this was a list of displays, but there was never any way to add more
|
||||
@@ -168,6 +177,14 @@ MetaGroup* get_focussed_group (MetaDisplay *display);
|
||||
static void
|
||||
meta_display_class_init (MetaDisplayClass *klass)
|
||||
{
|
||||
display_signals[OVERLAY_KEY] =
|
||||
g_signal_new ("overlay-key",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5167,6 +5184,12 @@ meta_display_remove_autoraise_callback (MetaDisplay *display)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_overlay_key_activate (MetaDisplay *display)
|
||||
{
|
||||
g_signal_emit (display, display_signals[OVERLAY_KEY], 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
void
|
||||
meta_display_get_compositor_version (MetaDisplay *display,
|
||||
|
Reference in New Issue
Block a user