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
This commit is contained in:
Jonas Ådahl 2017-02-15 15:06:43 +08:00
parent 1039386e10
commit a48c9d6cd9
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;