mirror of
https://github.com/elementary/gala.git
synced 2024-12-18 06:41:36 +03:00
Fix flicker for non autohide panels
This commit is contained in:
parent
a97122c830
commit
776a0074d5
@ -156,14 +156,8 @@ public class Gala.PanelClone : Object {
|
||||
|
||||
new GesturePropertyTransition (clone, gesture_tracker, "y", null, calculate_clone_y (false)).start (with_gesture, (cancel_action) => {
|
||||
if (!cancel_action) {
|
||||
// We need the small timeout because in the case that we're showing in sync with the multitasking view
|
||||
// we have to make sure that we hide the clone after the multitasking view was already hidden otherwise
|
||||
// it flickers because the actual window actors are hidden by the multitasking view
|
||||
Timeout.add_once (10, () => {
|
||||
force_hide = false;
|
||||
clone.visible = false;
|
||||
panel_hidden = false;
|
||||
});
|
||||
clone.visible = false;
|
||||
panel_hidden = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -702,37 +702,29 @@ namespace Gala {
|
||||
ShellClientsManager.get_instance ().set_force_hide_panels (false, multitasking_gesture_tracker, with_gesture);
|
||||
}
|
||||
|
||||
GestureTracker.OnEnd on_animation_end = (percentage, cancel_action, calculated_duration) => {
|
||||
Timeout.add (calculated_duration, () => {
|
||||
if (!opening) {
|
||||
foreach (var container in window_containers_monitors) {
|
||||
container.visible = false;
|
||||
}
|
||||
|
||||
hide ();
|
||||
|
||||
wm.background_group.show ();
|
||||
wm.window_group.show ();
|
||||
wm.top_window_group.show ();
|
||||
|
||||
wm.pop_modal (modal_proxy);
|
||||
// The callback needs to run at the same frame as the others (e.g. PanelClone) so we can't do a simple Timeout here
|
||||
// The actual transition does nothing here, since the opacity just stays at 255
|
||||
new GesturePropertyTransition (this, multitasking_gesture_tracker, "opacity", null, 255u).start (with_gesture, (cancel_action) => {
|
||||
if (!opening) {
|
||||
foreach (var container in window_containers_monitors) {
|
||||
container.visible = false;
|
||||
}
|
||||
|
||||
animating = false;
|
||||
hide ();
|
||||
|
||||
if (cancel_action) {
|
||||
toggle (false, true);
|
||||
}
|
||||
wm.background_group.show ();
|
||||
wm.window_group.show ();
|
||||
wm.top_window_group.show ();
|
||||
|
||||
return Source.REMOVE;
|
||||
});
|
||||
};
|
||||
wm.pop_modal (modal_proxy);
|
||||
}
|
||||
|
||||
if (!with_gesture) {
|
||||
on_animation_end (1, false, is_cancel_animation ? 0 : ANIMATION_DURATION);
|
||||
} else {
|
||||
multitasking_gesture_tracker.connect_handlers (null, null, (owned) on_animation_end);
|
||||
}
|
||||
animating = false;
|
||||
|
||||
if (cancel_action) {
|
||||
toggle (false, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private bool keybinding_filter (Meta.KeyBinding binding) {
|
||||
|
Loading…
Reference in New Issue
Block a user