mirror of
https://github.com/elementary/gala.git
synced 2024-12-24 01:36:05 +03:00
Provide action to switch to the last workspace (#229)
This commit is contained in:
parent
f1a491753a
commit
f02b776d95
@ -9,6 +9,7 @@
|
||||
<value nick="custom-command" value="5" />
|
||||
<value nick="window-overview" value="6" />
|
||||
<value nick="window-overview-all" value="7" />
|
||||
<value nick="switch-to-workspace-last" value="8" />
|
||||
</enum>
|
||||
<enum id="GalaWindowOverviewType">
|
||||
<value nick='grid' value='0'/>
|
||||
|
@ -26,7 +26,8 @@ namespace Gala
|
||||
OPEN_LAUNCHER,
|
||||
CUSTOM_COMMAND,
|
||||
WINDOW_OVERVIEW,
|
||||
WINDOW_OVERVIEW_ALL
|
||||
WINDOW_OVERVIEW_ALL,
|
||||
SWITCH_TO_WORKSPACE_LAST
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -684,6 +684,10 @@ namespace Gala
|
||||
window_overview.open (hints);
|
||||
}
|
||||
break;
|
||||
case ActionType.SWITCH_TO_WORKSPACE_LAST:
|
||||
var workspace = screen.get_workspace_by_index (screen.get_n_workspaces () - 1);
|
||||
workspace.activate (display.get_current_time ());
|
||||
break;
|
||||
default:
|
||||
warning ("Trying to run unknown action");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user