From ed942f51e74557532f2d6a49c972e6124e76dff6 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Tue, 17 Jan 2023 15:53:41 +0000 Subject: arctica-greeter-check-hidpi: Fix deprecations. Ported from Slick Greeter by Mike Gabriel. https://github.com/linuxmint/slick-greeter/commit/1fb20ba8665651307e6d498dc07009a2da26ab40 --- arctica-greeter-check-hidpi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arctica-greeter-check-hidpi b/arctica-greeter-check-hidpi index eaa01ca..8674300 100755 --- a/arctica-greeter-check-hidpi +++ b/arctica-greeter-check-hidpi @@ -29,13 +29,11 @@ def get_window_scale(): window_scale = 1 try: display = Gdk.Display.get_default() - screen = display.get_default_screen() - primary = screen.get_primary_monitor() - - rect = screen.get_monitor_geometry(primary) - width_mm = screen.get_monitor_width_mm(primary) - height_mm = screen.get_monitor_height_mm(primary) - monitor_scale = screen.get_monitor_scale_factor(primary) + monitor = display.get_primary_monitor() + rect = monitor.get_geometry() + width_mm = monitor.get_width_mm() + height_mm = monitor.get_height_mm() + monitor_scale = monitor.get_scale_factor() # Return 1 if the screen size isn't available (some TVs report their aspect ratio instead ... 16/9 or 16/10) if ((width_mm == 160 and height_mm == 90) \ -- cgit v1.2.3