mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
layout: Add scale property to Monitor
https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
parent
9e881ab637
commit
deead2af97
1 changed files with 5 additions and 2 deletions
|
|
@ -146,12 +146,13 @@ var MonitorConstraint = GObject.registerClass({
|
|||
});
|
||||
|
||||
var Monitor = class Monitor {
|
||||
constructor(index, geometry) {
|
||||
constructor(index, geometry, geometry_scale) {
|
||||
this.index = index;
|
||||
this.x = geometry.x;
|
||||
this.y = geometry.y;
|
||||
this.width = geometry.width;
|
||||
this.height = geometry.height;
|
||||
this.geometry_scale = geometry_scale;
|
||||
}
|
||||
|
||||
get inFullscreen() {
|
||||
|
|
@ -318,7 +319,9 @@ var LayoutManager = GObject.registerClass({
|
|||
this.monitors = [];
|
||||
let nMonitors = display.get_n_monitors();
|
||||
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) {
|
||||
this.primaryIndex = this.bottomIndex = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue