mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 05:44:08 +00:00
monitor-manager: Fix orientation changes on devices with 90° mounted panels
Commit 2289f56112a9 ("monitor-manager: Don't apply unneeded orientation changes") added an early return to handle_orientation_change () in case the transform is unchanged. But this did not take the correction of the transform for devices with 90° mounted panels into account causing a desired orientation change to get skipped if the new orientation matches the corrected logical orientation from the previous transform setting. Fix this by calling meta_monitor_crtc_to_logical_transform () on the transform before comparing it, matching the meta_monitor_crtc_to_logical_transform () call in create_for_builtin_display_rotation (). Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2090>
This commit is contained in:
parent
6204769fdb
commit
cc9bb7c516
@ -869,6 +869,7 @@ handle_orientation_change (MetaOrientationManager *orientation_manager,
|
||||
{
|
||||
MetaOrientation orientation;
|
||||
MetaMonitorTransform transform;
|
||||
MetaMonitorTransform panel_transform;
|
||||
GError *error = NULL;
|
||||
MetaMonitorsConfig *config;
|
||||
MetaMonitor *laptop_panel;
|
||||
@ -885,7 +886,10 @@ handle_orientation_change (MetaOrientationManager *orientation_manager,
|
||||
transform = meta_monitor_transform_from_orientation (orientation);
|
||||
|
||||
laptop_logical_monitor = meta_monitor_get_logical_monitor (laptop_panel);
|
||||
if (meta_logical_monitor_get_transform (laptop_logical_monitor) == transform)
|
||||
panel_transform =
|
||||
meta_monitor_crtc_to_logical_transform (laptop_panel, transform);
|
||||
if (meta_logical_monitor_get_transform (laptop_logical_monitor) ==
|
||||
panel_transform)
|
||||
return;
|
||||
|
||||
current_config =
|
||||
|
Loading…
x
Reference in New Issue
Block a user