move_window: require timestamp (#1831)

This commit is contained in:
Leo 2024-01-18 19:30:32 +09:00 committed by GitHub
parent 15ef7cf3d6
commit 2bf7197e7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -173,7 +173,7 @@ namespace Gala {
* @param window The window to be moved * @param window The window to be moved
* @param workspace The workspace the window should be moved to * @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. * Switches to the next workspace in the given direction.

View File

@ -458,7 +458,7 @@ namespace Gala {
} }
if (target_workspace != null) { if (target_workspace != null) {
move_window (window, target_workspace); move_window (window, target_workspace, event.get_time ());
} }
} }
@ -792,7 +792,7 @@ namespace Gala {
/** /**
* {@inheritDoc} * {@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) { if (window == null) {
return; return;
} }
@ -820,7 +820,7 @@ namespace Gala {
window.change_workspace (workspace); window.change_workspace (workspace);
} }
workspace.activate_with_focus (window, display.get_current_time ()); workspace.activate_with_focus (window, timestamp);
} }
/** /**
@ -991,13 +991,13 @@ namespace Gala {
unowned var workspace_manager = get_display ().get_workspace_manager (); unowned var workspace_manager = get_display ().get_workspace_manager ();
unowned var active_workspace = workspace_manager.get_active_workspace (); unowned var active_workspace = workspace_manager.get_active_workspace ();
unowned var target_workspace = active_workspace.get_neighbor (Meta.MotionDirection.LEFT); 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; break;
case ActionType.MOVE_CURRENT_WORKSPACE_RIGHT: case ActionType.MOVE_CURRENT_WORKSPACE_RIGHT:
unowned var workspace_manager = get_display ().get_workspace_manager (); unowned var workspace_manager = get_display ().get_workspace_manager ();
unowned var active_workspace = workspace_manager.get_active_workspace (); unowned var active_workspace = workspace_manager.get_active_workspace ();
unowned var target_workspace = active_workspace.get_neighbor (Meta.MotionDirection.RIGHT); 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; break;
case ActionType.CLOSE_CURRENT: case ActionType.CLOSE_CURRENT:
if (current != null && current.can_close ()) if (current != null && current.can_close ())