mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
overview: Handle unredirection in OverviewShown state machine
Under certain unknown circumstances currently not every
`disable_unredirect_for_display()` gets matched with an
`enable_unredirect_for_display()` when closing the overview.
As we only want to not disable unredirection when hidden and we nowadays
have a state machine that ensures we transition to and from one state to
another only once, handle unredirection en-/disablement as part of the
state transition.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2970>
(cherry picked from commit a94fcee961)
This commit is contained in:
parent
45de25eaba
commit
3b921ba0cb
1 changed files with 5 additions and 9 deletions
|
|
@ -296,6 +296,11 @@ var Overview = class extends Signals.EventEmitter {
|
|||
`${this._shownState} to ${state}`);
|
||||
}
|
||||
|
||||
if (this._shownState === OverviewShownState.HIDDEN)
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
else if (state === OverviewShownState.HIDDEN)
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
|
||||
this._shownState = state;
|
||||
this.emit(OVERVIEW_SHOWN_TRANSITIONS[state].signal);
|
||||
}
|
||||
|
|
@ -402,8 +407,6 @@ var Overview = class extends Signals.EventEmitter {
|
|||
|
||||
_gestureUpdate(tracker, progress) {
|
||||
if (!this._shown) {
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
|
||||
this._shown = true;
|
||||
this._visible = true;
|
||||
this._visibleTarget = true;
|
||||
|
|
@ -559,8 +562,6 @@ var Overview = class extends Signals.EventEmitter {
|
|||
this._visibleTarget = true;
|
||||
this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
|
||||
Main.layoutManager.overviewGroup.set_child_above_sibling(
|
||||
this._coverPane, null);
|
||||
this._coverPane.show();
|
||||
|
|
@ -627,9 +628,6 @@ var Overview = class extends Signals.EventEmitter {
|
|||
}
|
||||
|
||||
_hideDone() {
|
||||
// Re-enable unredirection
|
||||
Meta.enable_unredirect_for_display(global.display);
|
||||
|
||||
this._coverPane.hide();
|
||||
|
||||
this._visible = false;
|
||||
|
|
@ -679,8 +677,6 @@ var Overview = class extends Signals.EventEmitter {
|
|||
// the animation because of a race in the xserver where the grab
|
||||
// fails when requested very early during startup.
|
||||
|
||||
Meta.disable_unredirect_for_display(global.display);
|
||||
|
||||
this._changeShownState(OverviewShownState.SHOWING);
|
||||
|
||||
this._overview.runStartupAnimation(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue