From a48c9d6cd96e4b04a6d1ae97f8992b80702acccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 15 Feb 2017 15:06:43 +0800 Subject: [PATCH] input-settings: Don't use screen limits when keeping aspect ratio When no output was specified, the screen limit was used to calculate the aspect ratio. The screen limit, however, is either just an arbitrary number if no screen limit is applicable, or a hardware graphics buffer limit, which has nothing to do with anything actually displayed. Change it to use the screen size instead, to get something that makes more sense when no output is found. https://bugzilla.gnome.org/show_bug.cgi?id=779745 --- src/backends/native/meta-input-settings-native.c | 6 +++--- src/backends/x11/meta-input-settings-x11.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backends/native/meta-input-settings-native.c b/src/backends/native/meta-input-settings-native.c index 98a86bd8e..bbe99a0ea 100644 --- a/src/backends/native/meta-input-settings-native.c +++ b/src/backends/native/meta-input-settings-native.c @@ -411,9 +411,9 @@ meta_input_settings_native_set_tablet_keep_aspect (MetaInputSettings *settings, backend = meta_get_backend (); monitor_manager = meta_backend_get_monitor_manager (backend); - meta_monitor_manager_get_screen_limits (monitor_manager, - &output_width, - &output_height); + meta_monitor_manager_get_screen_size (monitor_manager, + &output_width, + &output_height); } output_aspect = (gdouble) output_width / output_height; diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c index a2c173193..4dfa32b73 100644 --- a/src/backends/x11/meta-input-settings-x11.c +++ b/src/backends/x11/meta-input-settings-x11.c @@ -628,8 +628,8 @@ meta_input_settings_x11_set_tablet_keep_aspect (MetaInputSettings *settings, backend = meta_get_backend (); monitor_manager = meta_backend_get_monitor_manager (backend); - meta_monitor_manager_get_screen_limits (monitor_manager, - &width, &height); + meta_monitor_manager_get_screen_size (monitor_manager, + &width, &height); } output_aspect = (gdouble) width / height;