main: allow Alt-F1 to exit the overview
Also, change _globalKeyPressHandler to handle KEY_PRESS, not KEY_RELEASE, for consistency with other code (and so that the combination of an Alt-F1 press and release doesn't first enter the overview and then immediately exit it). https://bugzilla.gnome.org/show_bug.cgi?id=636371
This commit is contained in:
parent
84bac4414c
commit
ed83b5494c
@ -307,7 +307,7 @@ function _removeUnusedWorkspaces() {
|
|||||||
function _globalKeyPressHandler(actor, event) {
|
function _globalKeyPressHandler(actor, event) {
|
||||||
if (modalCount == 0)
|
if (modalCount == 0)
|
||||||
return false;
|
return false;
|
||||||
if (event.type() != Clutter.EventType.KEY_RELEASE)
|
if (event.type() != Clutter.EventType.KEY_PRESS)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
@ -349,6 +349,10 @@ function _globalKeyPressHandler(actor, event) {
|
|||||||
case Meta.KeyBindingAction.COMMAND_2:
|
case Meta.KeyBindingAction.COMMAND_2:
|
||||||
getRunDialog().open();
|
getRunDialog().open();
|
||||||
return true;
|
return true;
|
||||||
|
case Meta.KeyBindingAction.PANEL_MAIN_MENU:
|
||||||
|
if (overview.visible)
|
||||||
|
overview.hide();
|
||||||
|
return true;
|
||||||
case Meta.KeyBindingAction.SWITCH_PANELS:
|
case Meta.KeyBindingAction.SWITCH_PANELS:
|
||||||
// Only intercept this when we're in the overview, and don't
|
// Only intercept this when we're in the overview, and don't
|
||||||
// intercept it if something beyond that (like, say, the
|
// intercept it if something beyond that (like, say, the
|
||||||
|
Loading…
Reference in New Issue
Block a user