mirror of
https://github.com/elementary/gala.git
synced 2024-12-18 23:02:14 +03:00
Don't manually map notifications while nudge animation is playing (#1611)
This commit is contained in:
parent
f7e8225775
commit
9cb7c0e193
@ -113,6 +113,7 @@ namespace Gala {
|
||||
|
||||
private GestureTracker gesture_tracker;
|
||||
private bool animating_switch_workspace = false;
|
||||
private bool animating_nudge = false;
|
||||
private bool switch_workspace_with_gesture = false;
|
||||
|
||||
/**
|
||||
@ -529,7 +530,7 @@ namespace Gala {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void switch_to_next_workspace (Meta.MotionDirection direction) {
|
||||
if (animating_switch_workspace) {
|
||||
if (animating_switch_workspace || animating_nudge) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -554,7 +555,7 @@ namespace Gala {
|
||||
return;
|
||||
}
|
||||
|
||||
animating_switch_workspace = true;
|
||||
animating_nudge = true;
|
||||
var nudge_gap = NUDGE_GAP * InternalUtils.get_ui_scaling_factor ();
|
||||
|
||||
float dest = 0;
|
||||
@ -586,7 +587,7 @@ namespace Gala {
|
||||
ui_group.add_transition ("nudge", nudge_gesture);
|
||||
|
||||
switch_workspace_with_gesture = false;
|
||||
animating_switch_workspace = false;
|
||||
animating_nudge = false;
|
||||
};
|
||||
|
||||
if (!switch_workspace_with_gesture) {
|
||||
@ -603,7 +604,7 @@ namespace Gala {
|
||||
nudge.set_key_frames (keyframes);
|
||||
nudge.set_values (x);
|
||||
nudge.completed.connect (() => {
|
||||
animating_switch_workspace = false;
|
||||
animating_nudge = false;
|
||||
});
|
||||
|
||||
ui_group.add_transition ("nudge", nudge);
|
||||
@ -1763,6 +1764,7 @@ namespace Gala {
|
||||
|| AnimationDuration.WORKSPACE_SWITCH == 0
|
||||
|| (direction != Meta.MotionDirection.LEFT && direction != Meta.MotionDirection.RIGHT)
|
||||
|| animating_switch_workspace
|
||||
|| animating_nudge
|
||||
|| workspace_view.is_opened ()
|
||||
|| window_overview.is_opened ()) {
|
||||
animating_switch_workspace = false;
|
||||
|
Loading…
Reference in New Issue
Block a user