Skip to content

Commit d9591fd

Browse files
committed
panel.js: No barriers when there is only a single monitor.
1 parent 683b219 commit d9591fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/ui/panel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,9 @@ Panel.prototype = {
24592459

24602460
if (this._destroyed) // ensure we do not try to set barriers if panel is being destroyed
24612461
return;
2462-
if (this.monitorIndex < 0 || this.monitorIndex >= global.screen.get_n_monitors()) // skip panels that never got created
2462+
2463+
let n_monitors = global.display.get_n_monitors();
2464+
if (n_monitors == 1 || this.monitorIndex < 0 || this.monitorIndex >= n_monitors) // skip panels that never got created
24632465
return;
24642466

24652467
let screen_width = global.screen_width;

0 commit comments

Comments
 (0)