Commit ef3ec783 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

backends: adjust accelerometer rotation for panel-orientation

Based on mutter commit:
parent 179c6dab
......@@ -405,6 +405,20 @@ create_for_builtin_display_rotation (GfMonitorConfigManager *config_manager,
if (rotate)
transform = (current_logical_monitor_config->transform + 1) % GF_MONITOR_TRANSFORM_FLIPPED;
GfMonitor *panel;
* The transform coming from the accelerometer should be applied to
* the crtc as is, without taking panel-orientation into account, this
* is done so that non panel-orientation aware desktop environments do the
* right thing. Mutter corrects for panel-orientation when applying the
* transform from a logical-monitor-config, so we must convert here.
panel = gf_monitor_manager_get_laptop_panel (config_manager->monitor_manager);
transform = gf_monitor_crtc_to_logical_transform (panel, transform);
if (current_logical_monitor_config->transform == transform)
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment