mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
monitor-manager: Don't apply unneeded orientation changes
There's no need to ensure monitor orientation changes if the wanted orientation is matching the current one. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
This commit is contained in:
parent
e976137d97
commit
2289f56112
@ -811,6 +811,14 @@ handle_orientation_change (MetaOrientationManager *orientation_manager,
|
||||
MetaMonitorTransform transform;
|
||||
GError *error = NULL;
|
||||
MetaMonitorsConfig *config;
|
||||
MetaMonitor *laptop_panel;
|
||||
MetaLogicalMonitor *laptop_logical_monitor;
|
||||
|
||||
laptop_panel = meta_monitor_manager_get_laptop_panel (manager);
|
||||
g_return_if_fail (laptop_panel);
|
||||
|
||||
if (!meta_monitor_is_active (laptop_panel))
|
||||
return;
|
||||
|
||||
switch (meta_orientation_manager_get_orientation (orientation_manager))
|
||||
{
|
||||
@ -832,6 +840,10 @@ handle_orientation_change (MetaOrientationManager *orientation_manager,
|
||||
return;
|
||||
}
|
||||
|
||||
laptop_logical_monitor = meta_monitor_get_logical_monitor (laptop_panel);
|
||||
if (meta_logical_monitor_get_transform (laptop_logical_monitor) == transform)
|
||||
return;
|
||||
|
||||
config =
|
||||
meta_monitor_config_manager_create_for_orientation (manager->config_manager,
|
||||
transform);
|
||||
|
Loading…
Reference in New Issue
Block a user