mirror of
https://github.com/elementary/gala.git
synced 2025-01-07 10:40:17 +03:00
Use get_neighbor for switching
This commit is contained in:
parent
fc0601ce23
commit
963ac8c09a
@ -444,10 +444,8 @@ namespace Gala
|
||||
|
||||
public override void kill_window_effects (WindowActor actor)
|
||||
{
|
||||
if (end_animation (ref mapping, actor)) {
|
||||
if (end_animation (ref mapping, actor))
|
||||
map_completed (actor);
|
||||
print ("KILLED MAPPING ONE\n");
|
||||
}
|
||||
if (end_animation (ref minimizing, actor))
|
||||
minimize_completed (actor);
|
||||
if (end_animation (ref maximizing, actor))
|
||||
|
@ -176,12 +176,12 @@ namespace Gala
|
||||
var screen = plugin.get_screen ();
|
||||
var display = screen.get_display ();
|
||||
|
||||
var idx = screen.get_active_workspace_index () + (reverse ? -1 : 1);
|
||||
var neighbor = screen.get_active_workspace ().get_neighbor (reverse ? MotionDirection.LEFT : MotionDirection.RIGHT);
|
||||
|
||||
if (idx < 0 || idx >= screen.n_workspaces)
|
||||
if (neighbor == null)
|
||||
return;
|
||||
|
||||
screen.get_workspace_by_index (idx).activate (display.get_current_time ());
|
||||
neighbor.activate (display.get_current_time ());
|
||||
}
|
||||
|
||||
public override bool leave_event (Clutter.CrossingEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user