Skip to content

Commit 3d8843c

Browse files
committed
panel.js: global.screen -> global.display
global.screen is there for backwards compatibility only.
1 parent d9591fd commit 3d8843c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

js/ui/panel.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ PanelManager.prototype = {
845845

846846
metaList[ID] = [monitorIndex, panelPosition]; // Note: metaList [i][0] is the monitor index, metaList [i][1] is the panelPosition
847847

848-
if (monitorIndex < 0 || monitorIndex >= global.screen.get_n_monitors()) {
848+
if (monitorIndex < 0 || monitorIndex >= global.display.get_n_monitors()) {
849849
global.log("Monitor " + monitorIndex + " not found. Not creating panel");
850850
return null;
851851
}
@@ -857,7 +857,7 @@ PanelManager.prototype = {
857857
},
858858

859859
_checkCanAdd: function() {
860-
let monitorCount = global.screen.get_n_monitors();
860+
let monitorCount = global.display.get_n_monitors();
861861
let panelCount = (monitorCount * 4) - this.panelCount; // max of 4 panels on a monitor, one per edge
862862

863863
this.canAdd = panelCount > 0;
@@ -1066,7 +1066,7 @@ PanelManager.prototype = {
10661066
},
10671067

10681068
_onMonitorsChanged: function() {
1069-
let monitorCount = global.screen.get_n_monitors();
1069+
let monitorCount = global.display.get_n_monitors();
10701070
let drawcorner = [false, false];
10711071

10721072
let panelProperties = getPanelsEnabledList()
@@ -1166,7 +1166,7 @@ PanelManager.prototype = {
11661166
* shows the dummy panels
11671167
*/
11681168
_showDummyPanels: function(callback) {
1169-
let monitorCount = global.screen.get_n_monitors();
1169+
let monitorCount = global.display.get_n_monitors();
11701170
this.dummyCallback = callback;
11711171
this.dummyPanels = [];
11721172

@@ -1237,7 +1237,7 @@ PanelDummy.prototype = {
12371237
this.monitorIndex = monitorIndex;
12381238
this.panelPosition = panelPosition;
12391239
this.callback = callback;
1240-
this.monitor = global.screen.get_monitor_geometry(monitorIndex);
1240+
this.monitor = global.display.get_monitor_geometry(monitorIndex);
12411241
let defaultheight = 40 * global.ui_scale;
12421242

12431243
this.actor = new Cinnamon.GenericContainer({style_class: "panel-dummy", reactive: true, track_hover: true, important: true});
@@ -2026,7 +2026,7 @@ Panel.prototype = {
20262026
this.panelId = id;
20272027
this.drawcorner = drawcorner;
20282028
this.monitorIndex = monitorIndex;
2029-
this.monitor = global.screen.get_monitor_geometry(monitorIndex);
2029+
this.monitor = global.display.get_monitor_geometry(monitorIndex);
20302030
this.panelPosition = panelPosition;
20312031
this.toppanelHeight = toppanelHeight;
20322032
this.bottompanelHeight = bottompanelHeight;
@@ -2204,7 +2204,7 @@ Panel.prototype = {
22042204
this.panelPosition = panelPosition;
22052205
this._positionChanged = true;
22062206

2207-
this.monitor = global.screen.get_monitor_geometry(monitorIndex);
2207+
this.monitor = global.display.get_monitor_geometry(monitorIndex);
22082208
//
22092209
// If there are any corners then remove them - they may or may not be required
22102210
// in the new position, so we cannot just move them
@@ -2804,7 +2804,7 @@ Panel.prototype = {
28042804
// NB If you want to use margin to inset the panels within a monitor, then you can't just set it here
28052805
// else full screen windows will then go right to the edge with the panels floating over
28062806
//
2807-
this.monitor = global.screen.get_monitor_geometry(this.monitorIndex);
2807+
this.monitor = global.display.get_monitor_geometry(this.monitorIndex);
28082808
let horizontal_panel = (!!((this.panelPosition == PanelLoc.top || this.panelPosition == PanelLoc.bottom)));
28092809

28102810
// this stands for width on vertical panels, and height on horizontal panels

0 commit comments

Comments
 (0)