summaryrefslogtreecommitdiff
path: root/src/Dimensions.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
commit71137cc5832110d91599d68790402cf196762ed3 (patch)
treee7985bbfb6ca50ea738b38a9f852ee51431d48a7 /src/Dimensions.vala
parent8ae550d463720d5d1c0e253af29843ff15de1a54 (diff)
parent1e92964463e564bb3359a7110342182fcfdc67f2 (diff)
Merge branch 'release/debian/0.30.1-1'debian/0.30.1-1
Diffstat (limited to 'src/Dimensions.vala')
-rw-r--r--src/Dimensions.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Dimensions.vala b/src/Dimensions.vala
index 99fe469..3b4163c 100644
--- a/src/Dimensions.vala
+++ b/src/Dimensions.vala
@@ -315,10 +315,12 @@ public struct Scaling {
return Scaling(constraint, scale, Dimensions(), scale_up);
}
- private static Dimensions get_screen_dimensions(Gtk.Window window) {
- Gdk.Screen screen = window.get_screen();
+ public static Dimensions get_screen_dimensions(Gtk.Window window) {
+ var display = window.get_window().get_display();
+ var monitor = display.get_monitor_at_window(window.get_window());
+ var geom = monitor.get_geometry();
- return Dimensions(screen.get_width(), screen.get_height());
+ return Dimensions(geom.width, geom.height);
}
private int scale_to_pixels() {