Skip to content
Open
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
7 changes: 7 additions & 0 deletions animator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,13 @@ export let Animator = class {
}
}

if (dock.hitbox) {
dock.hitbox.x = dock._background.x + dock.x;
dock.hitbox.y = dock._background.y + dock.y;
dock.hitbox.width = dock._background.width;
dock.hitbox.height = dock._background.height;
}

dock._updateTransparenies();
}

Expand Down
46 changes: 32 additions & 14 deletions dock.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ export let Dock = GObject.registerClass(
name: 'DockStruts',
offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS,
});
this.hitbox = new St.Widget({
name: 'DockHitbox',
reactive: false,
track_hover: false,
});
this.dwell = new St.Widget({
name: 'DockDwell',
reactive: true,
Expand Down Expand Up @@ -327,7 +332,7 @@ export let Dock = GObject.registerClass(
if (target && target.iconEffect) {
target.iconEffect.color = color;
}
} catch(err) {
} catch (err) {
// console.log(err)
}
});
Expand Down Expand Up @@ -368,7 +373,7 @@ export let Dock = GObject.registerClass(
this.Dash = Dash;
let dash = new Dash();

dash._adjustIconSize = () => {};
dash._adjustIconSize = () => { };
let con = console;
let orig = dash._createAppItem;
orig = orig.bind(dash);
Expand Down Expand Up @@ -411,7 +416,7 @@ export let Dock = GObject.registerClass(
'leave-event',
this._onLeaveEvent.bind(this),
'destroy',
() => {},
() => { },
this
);

Expand All @@ -428,15 +433,25 @@ export let Dock = GObject.registerClass(

Main.layoutManager.addChrome(this.struts, {
affectsStruts: !this.extension.autohide_dash,
...(Config.PACKAGE_VERSION[0] == '4'
? { affectsInputRegion: false }
: {}),
trackFullscreen: true,
});

Main.layoutManager.addChrome(this.hitbox, {
affectsStruts: false,
...(Config.PACKAGE_VERSION[0] == '4'
? { affectsInputRegion: true }
: {}),
trackFullscreen: false,
trackFullscreen: true,
});

Main.layoutManager.addChrome(this, {
affectsStruts: false,
// affectsInputRegion: false,
...(Config.PACKAGE_VERSION[0] == '4'
? { affectsInputRegion: false }
: {}),
trackFullscreen: true,
});

Expand All @@ -454,6 +469,7 @@ export let Dock = GObject.registerClass(
return;
}
Main.layoutManager.removeChrome(this.struts);
Main.layoutManager.removeChrome(this.hitbox);
Main.layoutManager.removeChrome(this);
Main.layoutManager.removeChrome(this.dwell);
this._onChrome = false;
Expand Down Expand Up @@ -539,7 +555,7 @@ export let Dock = GObject.registerClass(
}
return null;
}

_inspectIcon(c) {
if (!c.visible) return false;

Expand Down Expand Up @@ -627,7 +643,7 @@ export let Dock = GObject.registerClass(
}
}
}

if (c._icon) {
// renderer takes care of displaying an icon
c._icon.opacity = 0;
Expand Down Expand Up @@ -921,7 +937,7 @@ export let Dock = GObject.registerClass(
prepare: (() => {
this.extension.services._debounceCheckDownloads();
}).bind(this),
cleanup: () => {},
cleanup: () => { },
},
];

Expand Down Expand Up @@ -1261,9 +1277,10 @@ export let Dock = GObject.registerClass(

_beginAnimation(caller) {
if (this.extension.debug_visual) {
this.add_style_class_name('hi');
this.struts.add_style_class_name('hi');
this.dwell.add_style_class_name('hi');
this.hitbox.add_style_class_name('hi');
// this.add_style_class_name('hi');
// this.struts.add_style_class_name('hi');
// this.dwell.add_style_class_name('hi');
}

this._favorite_ids = Fav.getAppFavorites()._getIds();
Expand Down Expand Up @@ -1294,9 +1311,10 @@ export let Dock = GObject.registerClass(

_endAnimation() {
if (this.extension.debug_visual) {
this.remove_style_class_name('hi');
this.struts.remove_style_class_name('hi');
this.dwell.remove_style_class_name('hi');
this.hitbox.remove_style_class_name('hi');
// this.remove_style_class_name('hi');
// this.struts.remove_style_class_name('hi');
// this.dwell.remove_style_class_name('hi');
}

this._updateFocusedIcon();
Expand Down