@@ -23,7 +23,6 @@ namespace Gala {
2323 */
2424 public class MultitaskingView : ActorTarget , ActivatableComponent {
2525 public const int ANIMATION_DURATION = 250 ;
26- private const string OPEN_MULTITASKING_VIEW = " dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1" ;
2726
2827 private GestureController workspaces_gesture_controller;
2928 private GestureController multitasking_gesture_controller;
@@ -59,14 +58,14 @@ namespace Gala {
5958 opened = false ;
6059 display = wm. get_display ();
6160
62- multitasking_gesture_controller = new GestureController (MULTITASKING_VIEW , this );
61+ multitasking_gesture_controller = new GestureController (MULTITASKING_VIEW , this , wm );
6362 multitasking_gesture_controller. enable_touchpad ();
6463
6564 add_target (ShellClientsManager . get_instance ()); // For hiding the panels
6665
6766 workspaces = new WorkspaceRow (display);
6867
69- workspaces_gesture_controller = new GestureController (SWITCH_WORKSPACE , this ) {
68+ workspaces_gesture_controller = new GestureController (SWITCH_WORKSPACE , this , wm ) {
7069 overshoot_upper_clamp = 0.1
7170 };
7271 workspaces_gesture_controller. enable_touchpad ();
@@ -248,6 +247,7 @@ namespace Gala {
248247
249248 modal_proxy = wm. push_modal (this );
250249 modal_proxy. set_keybinding_filter (keybinding_filter);
250+ modal_proxy. allow_actions ({ MULTITASKING_VIEW , SWITCH_WORKSPACE , ZOOM });
251251
252252 var scale = display. get_monitor_scale (display. get_primary_monitor ());
253253 icon_groups. force_reposition ();
@@ -490,28 +490,7 @@ namespace Gala {
490490 private bool keybinding_filter (Meta .KeyBinding binding ) {
491491 var action = Meta . Prefs . get_keybinding_action (binding. get_name ());
492492
493- // allow super key only when it toggles multitasking view
494- if (action == Meta . KeyBindingAction . OVERLAY_KEY &&
495- gala_behavior_settings. get_string (" overlay-action" ) == OPEN_MULTITASKING_VIEW ) {
496- return false ;
497- }
498-
499493 switch (action) {
500- case Meta . KeyBindingAction . WORKSPACE_1:
501- case Meta . KeyBindingAction . WORKSPACE_2:
502- case Meta . KeyBindingAction . WORKSPACE_3:
503- case Meta . KeyBindingAction . WORKSPACE_4:
504- case Meta . KeyBindingAction . WORKSPACE_5:
505- case Meta . KeyBindingAction . WORKSPACE_6:
506- case Meta . KeyBindingAction . WORKSPACE_7:
507- case Meta . KeyBindingAction . WORKSPACE_8:
508- case Meta . KeyBindingAction . WORKSPACE_9:
509- case Meta . KeyBindingAction . WORKSPACE_10:
510- case Meta . KeyBindingAction . WORKSPACE_11:
511- case Meta . KeyBindingAction . WORKSPACE_12:
512- case Meta . KeyBindingAction . WORKSPACE_LEFT:
513- case Meta . KeyBindingAction . WORKSPACE_RIGHT:
514- case Meta . KeyBindingAction . SHOW_DESKTOP:
515494 case Meta . KeyBindingAction . NONE:
516495 case Meta . KeyBindingAction . LOCATE_POINTER_KEY:
517496 return false ;
@@ -520,12 +499,6 @@ namespace Gala {
520499 }
521500
522501 switch (binding. get_name ()) {
523- case " cycle-workspaces-next" :
524- case " cycle-workspaces-previous" :
525- case " switch-to-workspace-first" :
526- case " switch-to-workspace-last" :
527- case " zoom-in" :
528- case " zoom-out" :
529502 case " screenshot" :
530503 case " screenshot-clip" :
531504 return false ;
0 commit comments