1
0
Fork 0

MetaWaylandPointer: Don't keep our own MetaCursorTracker pointer

There is no reason to, we can just retrieve it every time we need it.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
This commit is contained in:
Jonas Ådahl 2015-07-17 15:29:42 +08:00
parent cd1ce2cb0a
commit 68279e8a08
2 changed files with 3 additions and 8 deletions

View file

@ -374,8 +374,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
manager = clutter_device_manager_get_default ();
pointer->device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
pointer->cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
}
void
@ -730,8 +728,7 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
void
meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer)
{
if (pointer->cursor_tracker == NULL)
return;
MetaCursorTracker *cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
if (pointer->current)
{
@ -747,15 +744,14 @@ meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer)
else
cursor_sprite = NULL;
meta_cursor_tracker_set_window_cursor (pointer->cursor_tracker,
cursor_sprite);
meta_cursor_tracker_set_window_cursor (cursor_tracker, cursor_sprite);
if (cursor_sprite)
g_object_unref (cursor_sprite);
}
else
{
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
meta_cursor_tracker_unset_window_cursor (cursor_tracker);
}
}

View file

@ -65,7 +65,6 @@ struct _MetaWaylandPointer
guint32 focus_serial;
guint32 click_serial;
MetaCursorTracker *cursor_tracker;
MetaWaylandSurface *cursor_surface;
struct wl_listener cursor_surface_destroy_listener;
int hotspot_x, hotspot_y;