mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
monitor-manager: Only manage orientation if we have a built in panel
All the auto-rotation code is expecting to have a built-in panel, but we still monitor accelerometer changes if we don't have one (uncommon, but possible). Thus manage the panel orientation in such case and update it on monitors changes. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
This commit is contained in:
parent
f78e21c45a
commit
e976137d97
@ -955,7 +955,8 @@ update_panel_orientation_managed (MetaMonitorManager *manager)
|
|||||||
|
|
||||||
panel_orientation_managed =
|
panel_orientation_managed =
|
||||||
(clutter_seat_get_touch_mode (seat) &&
|
(clutter_seat_get_touch_mode (seat) &&
|
||||||
meta_orientation_manager_has_accelerometer (orientation_manager));
|
meta_orientation_manager_has_accelerometer (orientation_manager) &&
|
||||||
|
meta_monitor_manager_get_laptop_panel (manager));
|
||||||
|
|
||||||
if (manager->panel_orientation_managed == panel_orientation_managed)
|
if (manager->panel_orientation_managed == panel_orientation_managed)
|
||||||
return;
|
return;
|
||||||
@ -3076,6 +3077,8 @@ rebuild_monitors (MetaMonitorManager *manager)
|
|||||||
monitor_normal);
|
monitor_normal);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_panel_orientation_managed (manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user