mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
core: Update tablet cursors
On wayland, tablets have their standalone pointer, which must be updated on events from the corresponding device.
This commit is contained in:
parent
0f93ad8b53
commit
806f930a16
@ -221,8 +221,20 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
|
|
||||||
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
|
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
|
||||||
{
|
{
|
||||||
meta_cursor_tracker_update_position (meta_cursor_tracker_get_for_screen (NULL),
|
MetaWaylandCompositor *compositor;
|
||||||
event->motion.x, event->motion.y);
|
|
||||||
|
compositor = meta_wayland_compositor_get_default ();
|
||||||
|
|
||||||
|
if (meta_wayland_tablet_manager_consumes_event (compositor->tablet_manager, event))
|
||||||
|
{
|
||||||
|
meta_wayland_tablet_manager_update_cursor_position (compositor->tablet_manager, event);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
|
||||||
|
meta_cursor_tracker_update_position (tracker, event->motion.x, event->motion.y);
|
||||||
|
}
|
||||||
|
|
||||||
display->monitor_cache_invalidated = TRUE;
|
display->monitor_cache_invalidated = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user