Skip to content

Commit

Permalink
move_window: require timestamp (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenemter committed Jan 18, 2024
1 parent 15ef7cf commit 2bf7197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace Gala {
* @param window The window to be moved
* @param workspace The workspace the window should be moved to
*/
public abstract void move_window (Meta.Window? window, Meta.Workspace workspace);
public abstract void move_window (Meta.Window? window, Meta.Workspace workspace, uint32 timestamp);

/**
* Switches to the next workspace in the given direction.
Expand Down
10 changes: 5 additions & 5 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ namespace Gala {
}

if (target_workspace != null) {
move_window (window, target_workspace);
move_window (window, target_workspace, event.get_time ());
}
}

Expand Down Expand Up @@ -792,7 +792,7 @@ namespace Gala {
/**
* {@inheritDoc}
*/
public void move_window (Meta.Window? window, Meta.Workspace workspace) {
public void move_window (Meta.Window? window, Meta.Workspace workspace, uint32 timestamp) {
if (window == null) {
return;
}
Expand Down Expand Up @@ -820,7 +820,7 @@ namespace Gala {
window.change_workspace (workspace);
}

workspace.activate_with_focus (window, display.get_current_time ());
workspace.activate_with_focus (window, timestamp);
}

/**
Expand Down Expand Up @@ -991,13 +991,13 @@ namespace Gala {
unowned var workspace_manager = get_display ().get_workspace_manager ();
unowned var active_workspace = workspace_manager.get_active_workspace ();
unowned var target_workspace = active_workspace.get_neighbor (Meta.MotionDirection.LEFT);
move_window (current, target_workspace);
move_window (current, target_workspace, Gtk.get_current_event_time ());
break;
case ActionType.MOVE_CURRENT_WORKSPACE_RIGHT:
unowned var workspace_manager = get_display ().get_workspace_manager ();
unowned var active_workspace = workspace_manager.get_active_workspace ();
unowned var target_workspace = active_workspace.get_neighbor (Meta.MotionDirection.RIGHT);
move_window (current, target_workspace);
move_window (current, target_workspace, Gtk.get_current_event_time ());
break;
case ActionType.CLOSE_CURRENT:
if (current != null && current.can_close ())
Expand Down

0 comments on commit 2bf7197

Please sign in to comment.