diff options
author | Clement Lefebvre <clement.lefebvre@linuxmint.com> | 2023-01-17 15:53:41 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-02-06 12:08:33 +0100 |
commit | ed942f51e74557532f2d6a49c972e6124e76dff6 (patch) | |
tree | c0391dece64390671e185dbd8bd5cf7020718927 /arctica-greeter-check-hidpi | |
parent | f7461080c7e9ece34928850b6c9ce99abc808b97 (diff) | |
download | arctica-greeter-ed942f51e74557532f2d6a49c972e6124e76dff6.tar.gz arctica-greeter-ed942f51e74557532f2d6a49c972e6124e76dff6.tar.bz2 arctica-greeter-ed942f51e74557532f2d6a49c972e6124e76dff6.zip |
arctica-greeter-check-hidpi: Fix deprecations.
Ported from Slick Greeter by Mike Gabriel.
https://github.com/linuxmint/slick-greeter/commit/1fb20ba8665651307e6d498dc07009a2da26ab40
Diffstat (limited to 'arctica-greeter-check-hidpi')
-rwxr-xr-x | arctica-greeter-check-hidpi | 12 |
1 files 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) \ |