From 9a79c71e885b068081824a2ebfee7ce12c3c7ad7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 15 May 2013 13:02:10 -0400 Subject: [PATCH] global: Remove support for the NONREACTIVE input mode As it's unused, this is a quick cleanup before we can go onto more important things. https://bugzilla.gnome.org/show_bug.cgi?id=700735 --- js/ui/ctrlAltTab.js | 3 +-- js/ui/grabHelper.js | 4 +--- src/shell-global.c | 18 +++++++----------- src/shell-global.h | 1 - 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index dbb1fe038..edfd6d3cd 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -61,8 +61,7 @@ const CtrlAltTabManager = new Lang.Class({ if (item.focusCallback) { item.focusCallback(timestamp); } else { - if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE || - global.stage_input_mode == Shell.StageInputMode.NORMAL) + if (global.stage_input_mode == Shell.StageInputMode.NORMAL) global.set_stage_input_mode(Shell.StageInputMode.FOCUSED); item.root.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index 9f1374ed7..b4294b32c 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -211,10 +211,8 @@ const GrabHelper = new Lang.Class({ this._grabbedFromKeynav = hadFocus; this._preGrabInputMode = global.stage_input_mode; - if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE || - this._preGrabInputMode == Shell.StageInputMode.NORMAL) { + if (this._preGrabInputMode == Shell.StageInputMode.NORMAL) global.set_stage_input_mode(Shell.StageInputMode.FOCUSED); - } this._keyFocusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged)); this._focusWindowChangedId = metaDisplay.connect('notify::focus-window', Lang.bind(this, this._focusWindowChanged)); diff --git a/src/shell-global.c b/src/shell-global.c index 889e14612..fe354823f 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -546,13 +546,10 @@ shell_global_focus_stage (ShellGlobal *global) * @mode: the stage input mode * * Sets the input mode of the stage; when @mode is - * %SHELL_STAGE_INPUT_MODE_NONREACTIVE, then the stage does not absorb - * any clicks, but just passes them through to underlying windows. - * When it is %SHELL_STAGE_INPUT_MODE_NORMAL, then the stage accepts - * clicks in the region defined by - * shell_global_set_stage_input_region() but passes through clicks - * outside that region. When it is %SHELL_STAGE_INPUT_MODE_FULLSCREEN, - * the stage absorbs all input. + * %SHELL_STAGE_INPUT_MODE_NORMAL, then the stage accepts clicks in + * the region defined by shell_global_set_stage_input_region() but + * passes through clicks outside that region. When it is + * %SHELL_STAGE_INPUT_MODE_FULLSCREEN, the stage absorbs all input. * * When the input mode is %SHELL_STAGE_INPUT_MODE_FOCUSED, the pointer * is handled as with %SHELL_STAGE_INPUT_MODE_NORMAL, but additionally @@ -561,9 +558,8 @@ shell_global_focus_stage (ShellGlobal *global) * will revert to %SHELL_STAGE_INPUT_MODE_NORMAL. * * Note that whenever a mutter-internal Gtk widget has a pointer grab, - * the shell behaves as though it was in - * %SHELL_STAGE_INPUT_MODE_NONREACTIVE, to ensure that the widget gets - * any clicks it is expecting. + * the shell goes unresponsive and passes things to the underlying GTK+ + * widget to ensure that the widget gets any clicks it is expecting. */ void shell_global_set_stage_input_mode (ShellGlobal *global, @@ -575,7 +571,7 @@ shell_global_set_stage_input_mode (ShellGlobal *global, screen = meta_plugin_get_screen (global->plugin); - if (mode == SHELL_STAGE_INPUT_MODE_NONREACTIVE || global->gtk_grab_active) + if (global->gtk_grab_active) meta_empty_stage_input_region (screen); else if (mode == SHELL_STAGE_INPUT_MODE_FULLSCREEN || !global->input_region) meta_set_stage_input_region (screen, None); diff --git a/src/shell-global.h b/src/shell-global.h index a8df0f5bc..69dff8554 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -46,7 +46,6 @@ void shell_global_end_modal (ShellGlobal *global, guint32 timestamp); typedef enum { - SHELL_STAGE_INPUT_MODE_NONREACTIVE, SHELL_STAGE_INPUT_MODE_NORMAL, SHELL_STAGE_INPUT_MODE_FOCUSED, SHELL_STAGE_INPUT_MODE_FULLSCREEN