Skip to content

Commit d0b2654

Browse files
committed
gwl: Fix updating tooltips and previews when the applet's panel
is move to the top edge. The new orientation was being treated as a boolean, and St.Side.TOP resolves to 0, so when moving a panel to the top edge, it was not updating the orientation for state listeners. Fixes #10976 Ref: linuxmint/mint21-beta#23
1 parent 9453e65 commit d0b2654

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class GroupedWindowListApplet extends Applet.Applet {
289289

290290
this.actor.set_style_class_name('grouped-window-list-box');
291291
this.state.set({appletActor: this.actor});
292-
this.on_orientation_changed(null);
292+
this.on_orientation_changed(orientation);
293293

294294
this.getAutoStartApps();
295295
this.onSwitchWorkspace = throttle(this.onSwitchWorkspace, 35, false); //Note: causes a 35ms delay in execution
@@ -407,12 +407,11 @@ class GroupedWindowListApplet extends Applet.Applet {
407407
}
408408

409409
on_orientation_changed(orientation) {
410-
if (orientation) {
411-
this.state.set({
412-
orientation: orientation,
413-
isHorizontal: orientation === St.Side.TOP || orientation === St.Side.BOTTOM
414-
});
415-
}
410+
this.state.set({
411+
orientation: orientation,
412+
isHorizontal: orientation === St.Side.TOP || orientation === St.Side.BOTTOM
413+
});
414+
416415
if (this.state.isHorizontal) {
417416
this.actor.remove_style_class_name('vertical');
418417
} else {

0 commit comments

Comments
 (0)