Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GNOME 48 support #2350

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions docking.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const DockedDash = GObject.registerClass({
this._autohideIsEnabled = null;
this._intellihideIsEnabled = null;

// This variable marks if Meta.disable_unredirect_for_display() is called
// This variable marks if _disableUnredirect() is called
// to help restore the original state when intelihide is disabled.
this._unredirectDisabled = false;

Expand Down Expand Up @@ -669,9 +669,22 @@ const DockedDash = GObject.registerClass({
]);
}

_disableUnredirect() {
if (!this._unredirectDisabled) {
if (Meta.disable_unredirect_for_display !== undefined)
Meta.disable_unredirect_for_display(global.display);
else if (global.compositor.disable_unredirect !== undefined)
global.compositor.disable_unredirect();
this._unredirectDisabled = true;
}
}

_restoreUnredirect() {
if (this._unredirectDisabled) {
Meta.enable_unredirect_for_display(global.display);
if (Meta.enable_unredirect_for_display !== undefined)
Meta.enable_unredirect_for_display(global.display);
else if (global.compositor.enable_unredirect !== undefined)
global.compositor.enable_unredirect();
this._unredirectDisabled = false;
}
}
Expand Down Expand Up @@ -829,10 +842,8 @@ const DockedDash = GObject.registerClass({
}

_animateIn(time, delay) {
if (!this._unredirectDisabled && this._intellihideIsEnabled) {
Meta.disable_unredirect_for_display(global.display);
this._unredirectDisabled = true;
}
if (this._intellihideIsEnabled)
this._disableUnredirect();
this._dockState = State.SHOWING;
this.dash.iconAnimator.start();
this._delayedHide = false;
Expand Down Expand Up @@ -870,10 +881,8 @@ const DockedDash = GObject.registerClass({
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._dockState = State.HIDDEN;
if (this._intellihideIsEnabled && this._unredirectDisabled) {
Meta.enable_unredirect_for_display(global.display);
this._unredirectDisabled = false;
}
if (this._intellihideIsEnabled)
this._restoreUnredirect();
// Remove queued barrier removal timeout if any
if (this._removeBarrierTimeoutId > 0)
GLib.source_remove(this._removeBarrierTimeoutId);
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"shell-version": [
"45",
"46",
"47"
"47",
"48"
],
"uuid": "[email protected]",
"name": "Dash to Dock",
Expand Down
Loading