diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2018-03-23 13:05:12 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-03-23 15:12:37 +0100 |
commit | 67917db45f96befb777e5f331a775ea3c2b53012 (patch) | |
tree | d93ad4b468e030001c9c3673990a9f67f2192726 /src/backends/meta-cursor-renderer.c | |
parent | 8286557a0555058440536e88393fda445d49d399 (diff) | |
download | mutter-67917db45f96befb777e5f331a775ea3c2b53012.tar.gz |
wayland: Use cursor position in logical monitor
When using two monitors size by side with different scales, once the
cursor moves from one output to another one, its size changes based on
the scale of the given output.
Changing the size of the cursor can cause the cursor area to change
output again if the hotspot is not exactly at the top left corner of the
area, causing the texture of the cursor to change, which will trigger
another output change, so on and so forth causing continuous surface
enter/leave event which flood the clients and eventually kill them.
Change the logic to use only the actual cursor position to determine if
its on the given logical monitor, so that it remains immune to scale
changes induced by output scale differences.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/83
Diffstat (limited to 'src/backends/meta-cursor-renderer.c')
-rw-r--r-- | src/backends/meta-cursor-renderer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backends/meta-cursor-renderer.c b/src/backends/meta-cursor-renderer.c index 27617ef92..6c0ec57a8 100644 --- a/src/backends/meta-cursor-renderer.c +++ b/src/backends/meta-cursor-renderer.c @@ -264,6 +264,18 @@ meta_cursor_renderer_set_position (MetaCursorRenderer *renderer, update_cursor (renderer, priv->displayed_cursor); } +ClutterPoint +meta_cursor_renderer_get_position (MetaCursorRenderer *renderer) +{ + MetaCursorRendererPrivate *priv = + meta_cursor_renderer_get_instance_private (renderer); + + return (ClutterPoint) { + .x = priv->current_x, + .y = priv->current_y + }; +} + MetaCursorSprite * meta_cursor_renderer_get_cursor (MetaCursorRenderer *renderer) { |