mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
cursor-renderer-native: Take CRTC transform into account
The CRTC level transform (not necessarily the hw transform) must be taken into account when calculating the position of the CRTC in the stage coordinate space, when placing the hw cursor, otherwise we'll place the cursor as if the monitor was not rotated. This wasn't a problem in the past, as with rotation, we always used the OpenGL cursor, so the issue newer showed. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1199
This commit is contained in:
parent
ea546a8b90
commit
568876da95
@ -407,13 +407,14 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
|
||||
else
|
||||
scale = 1.0;
|
||||
|
||||
meta_monitor_calculate_crtc_pos (monitor, monitor_mode,
|
||||
monitor_crtc_mode->output,
|
||||
META_MONITOR_TRANSFORM_NORMAL,
|
||||
&crtc_x, &crtc_y);
|
||||
|
||||
transform = meta_logical_monitor_get_transform (data->in_logical_monitor);
|
||||
transform = meta_monitor_logical_to_crtc_transform (monitor, transform);
|
||||
|
||||
meta_monitor_calculate_crtc_pos (monitor, monitor_mode,
|
||||
monitor_crtc_mode->output,
|
||||
transform,
|
||||
&crtc_x, &crtc_y);
|
||||
|
||||
if (meta_monitor_transform_is_rotated (transform))
|
||||
{
|
||||
crtc_width = monitor_crtc_mode->crtc_mode->height;
|
||||
|
Loading…
Reference in New Issue
Block a user