mirror of
https://github.com/elementary/gala.git
synced 2024-11-27 15:45:31 +03:00
move_window fixes
This commit is contained in:
parent
902f0027ee
commit
ee4541580d
@ -185,13 +185,18 @@ namespace Gala
|
||||
|
||||
void move_window (Window? window, bool up)
|
||||
{
|
||||
if (window == null || window.is_on_all_workspaces ())
|
||||
if (window == null)
|
||||
return;
|
||||
|
||||
var idx = screen.get_active_workspace ().index () + ((up)?-1:1);
|
||||
window.change_workspace_by_index (idx, false,
|
||||
screen.get_display ().get_current_time ());
|
||||
|
||||
|
||||
if (idx < 0 || idx >= screen.n_workspaces)
|
||||
return;
|
||||
|
||||
if (!window.is_on_all_workspaces ())
|
||||
window.change_workspace_by_index (idx, false,
|
||||
screen.get_display ().get_current_time ());
|
||||
|
||||
screen.get_workspace_by_index (idx).activate_with_focus (window,
|
||||
screen.get_display ().get_current_time ());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user