monitor-transform: Invert the behaviour of transform_point
Previously it transformed a physical CRTC coordinate to a logical desktop coordinate. But current and future users of the function all require conversion from logical coordinates to physical coordinates. We would have had to always invert the transform parameter which is a waste of time when we can instead just invert the function behaviour. We also simplify the parameters to show both the point coordinate and the area dimensions are potentially transformed. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3180>
This commit is contained in:

committed by
Marge Bot

parent
7a4c98438a
commit
5a05b1a901
@ -575,8 +575,7 @@ calculate_crtc_cursor_hotspot (MetaCursorSprite *cursor_sprite,
|
||||
width = meta_cursor_sprite_get_width (cursor_sprite);
|
||||
height = meta_cursor_sprite_get_height (cursor_sprite);
|
||||
meta_monitor_transform_transform_point (transform,
|
||||
width, height,
|
||||
hot_x, hot_y,
|
||||
&width, &height,
|
||||
&hot_x, &hot_y);
|
||||
*hotspot = GRAPHENE_POINT_INIT (hot_x * scale, hot_y * scale);
|
||||
}
|
||||
|
Reference in New Issue
Block a user