From 7ea4bcecd316eceeb1dc01c907c8b5b861bea006 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Wed, 25 Jul 2012 16:26:01 +0200 Subject: [PATCH] Add key for overlay key action --- data/org.pantheon.desktop.gala.gschema.xml | 5 +++++ src/Plugin.vala | 7 +++++++ src/Settings.vala | 1 + src/Widgets/WindowSwitcher.vala | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/data/org.pantheon.desktop.gala.gschema.xml b/data/org.pantheon.desktop.gala.gschema.xml index 6c3059fd..e938c5a5 100644 --- a/data/org.pantheon.desktop.gala.gschema.xml +++ b/data/org.pantheon.desktop.gala.gschema.xml @@ -21,6 +21,11 @@ + + '' + + + Home']]]> Shortcut to move to first workspace diff --git a/src/Plugin.vala b/src/Plugin.vala index 3dba406d..bfbf3866 100644 --- a/src/Plugin.vala +++ b/src/Plugin.vala @@ -71,6 +71,13 @@ namespace Gala screen.get_workspace_by_index (screen.n_workspaces - 1).activate (screen.get_display ().get_current_time ()); }); + screen.get_display ().overlay_key.connect (() => { + try { + Process.spawn_command_line_async ( + BehaviorSettings.get_default ().overlay_action); + } catch (Error e) { warning (e.message); } + }); + KeyBinding.set_custom_handler ("panel-main-menu", () => { try { Process.spawn_command_line_async ( diff --git a/src/Settings.vala b/src/Settings.vala index 57314164..32257ed7 100644 --- a/src/Settings.vala +++ b/src/Settings.vala @@ -22,6 +22,7 @@ namespace Gala public bool edge_tiling { get; set; } public string panel_main_menu_action { get; set; } public string toggle_recording_action { get; set; } + public string overlay_action { get; set; } public bool enable_manager_corner { get; set; } static BehaviorSettings? instance = null; diff --git a/src/Widgets/WindowSwitcher.vala b/src/Widgets/WindowSwitcher.vala index 0d9be63c..81124953 100644 --- a/src/Widgets/WindowSwitcher.vala +++ b/src/Widgets/WindowSwitcher.vala @@ -110,7 +110,7 @@ namespace Gala var current_actor = current_window.get_compositor_private () as Actor; foreach (var clone in window_clones) { if (current_actor == clone.source) { - clone.get_parent ().set_child_above_sibling (clone, null); + clone.get_parent ().set_child_below_sibling (clone, null); clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : 0.0f, opacity : 255); } else { clone.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth : -200.0f, opacity : 0);