mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
backends: Move update cursor position from the tracker to the backend
It doesn't quite fit in with the CursorTracker, and it simply forwards to the CursorRenderer anyway.
This commit is contained in:
parent
383ba566bd
commit
b51b2f7aa4
@ -150,4 +150,6 @@ gboolean meta_is_stage_views_enabled (void);
|
||||
|
||||
MetaInputSettings *meta_backend_get_input_settings (MetaBackend *backend);
|
||||
|
||||
void meta_backend_update_cursor_position (MetaBackend *backend, int x, int y);
|
||||
|
||||
#endif /* META_BACKEND_PRIVATE_H */
|
||||
|
@ -61,10 +61,6 @@ void meta_cursor_tracker_unset_window_cursor (MetaCursorTracker *tracker);
|
||||
void meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
|
||||
MetaCursorSprite *cursor_sprite);
|
||||
|
||||
void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
|
||||
int new_x,
|
||||
int new_y);
|
||||
|
||||
MetaCursorSprite * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);
|
||||
|
||||
#endif
|
||||
|
@ -348,20 +348,6 @@ meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
|
||||
sync_cursor (tracker);
|
||||
}
|
||||
|
||||
void
|
||||
meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
|
||||
int new_x,
|
||||
int new_y)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaCursorRenderer *cursor_renderer =
|
||||
meta_backend_get_cursor_renderer (backend);
|
||||
|
||||
g_assert (meta_is_wayland_compositor ());
|
||||
|
||||
meta_cursor_renderer_set_position (cursor_renderer, new_x, new_y);
|
||||
}
|
||||
|
||||
static void
|
||||
get_pointer_position_gdk (int *x,
|
||||
int *y,
|
||||
|
@ -322,7 +322,6 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
|
||||
{
|
||||
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
|
||||
ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
|
||||
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
|
||||
|
||||
/* XXX */
|
||||
guint32 time_ = 0;
|
||||
@ -331,7 +330,7 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
|
||||
clutter_evdev_warp_pointer (device, time_, x, y);
|
||||
|
||||
/* Warp displayed pointer cursor. */
|
||||
meta_cursor_tracker_update_position (cursor_tracker, x, y);
|
||||
meta_backend_set_cursor_position (backend, x, y);
|
||||
}
|
||||
|
||||
static MetaLogicalMonitor *
|
||||
|
@ -251,10 +251,7 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaCursorTracker *cursor_tracker =
|
||||
meta_backend_get_cursor_tracker (backend);
|
||||
|
||||
meta_cursor_tracker_update_position (cursor_tracker,
|
||||
meta_backend_update_cursor_position (cursor_tracker,
|
||||
event->motion.x,
|
||||
event->motion.y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user