layout: Add scale property to Monitor
https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
parent
9e881ab637
commit
deead2af97
@ -146,12 +146,13 @@ var MonitorConstraint = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var Monitor = class Monitor {
|
var Monitor = class Monitor {
|
||||||
constructor(index, geometry) {
|
constructor(index, geometry, geometry_scale) {
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.x = geometry.x;
|
this.x = geometry.x;
|
||||||
this.y = geometry.y;
|
this.y = geometry.y;
|
||||||
this.width = geometry.width;
|
this.width = geometry.width;
|
||||||
this.height = geometry.height;
|
this.height = geometry.height;
|
||||||
|
this.geometry_scale = geometry_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
get inFullscreen() {
|
get inFullscreen() {
|
||||||
@ -318,7 +319,9 @@ var LayoutManager = GObject.registerClass({
|
|||||||
this.monitors = [];
|
this.monitors = [];
|
||||||
let nMonitors = display.get_n_monitors();
|
let nMonitors = display.get_n_monitors();
|
||||||
for (let i = 0; i < nMonitors; i++)
|
for (let i = 0; i < nMonitors; i++)
|
||||||
this.monitors.push(new Monitor(i, display.get_monitor_geometry(i)));
|
this.monitors.push(new Monitor(i,
|
||||||
|
display.get_monitor_geometry(i),
|
||||||
|
display.get_monitor_scale(i)));
|
||||||
|
|
||||||
if (nMonitors == 0) {
|
if (nMonitors == 0) {
|
||||||
this.primaryIndex = this.bottomIndex = -1;
|
this.primaryIndex = this.bottomIndex = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user