mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 18:40:40 -05:00
wayland: Keep pointer to cursor sprite on MetaWaylandTabletTool
https://bugzilla.gnome.org/show_bug.cgi?id=778474
This commit is contained in:
parent
917aef5090
commit
6e2722298e
@ -98,7 +98,7 @@ meta_wayland_tablet_tool_update_cursor_surface (MetaWaylandTabletTool *tool)
|
|||||||
cursor = NULL;
|
cursor = NULL;
|
||||||
}
|
}
|
||||||
else if (tool->current_tablet)
|
else if (tool->current_tablet)
|
||||||
cursor = meta_cursor_sprite_from_theme (META_CURSOR_CROSSHAIR);
|
cursor = tool->default_sprite;
|
||||||
else
|
else
|
||||||
cursor = NULL;
|
cursor = NULL;
|
||||||
|
|
||||||
@ -397,6 +397,8 @@ meta_wayland_tablet_tool_new (MetaWaylandTabletSeat *seat,
|
|||||||
tool->focus_surface_destroy_listener.notify = tablet_tool_handle_focus_surface_destroy;
|
tool->focus_surface_destroy_listener.notify = tablet_tool_handle_focus_surface_destroy;
|
||||||
tool->cursor_surface_destroy_listener.notify = tablet_tool_handle_cursor_surface_destroy;
|
tool->cursor_surface_destroy_listener.notify = tablet_tool_handle_cursor_surface_destroy;
|
||||||
|
|
||||||
|
tool->default_sprite = meta_cursor_sprite_from_theme (META_CURSOR_CROSSHAIR);
|
||||||
|
|
||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,6 +418,8 @@ meta_wayland_tablet_tool_free (MetaWaylandTabletTool *tool)
|
|||||||
wl_list_init (wl_resource_get_link (resource));
|
wl_list_init (wl_resource_get_link (resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_object_unref (tool->default_sprite);
|
||||||
|
|
||||||
g_slice_free (MetaWaylandTabletTool, tool);
|
g_slice_free (MetaWaylandTabletTool, tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ struct _MetaWaylandTabletTool
|
|||||||
MetaWaylandSurface *cursor_surface;
|
MetaWaylandSurface *cursor_surface;
|
||||||
struct wl_listener cursor_surface_destroy_listener;
|
struct wl_listener cursor_surface_destroy_listener;
|
||||||
MetaCursorRenderer *cursor_renderer;
|
MetaCursorRenderer *cursor_renderer;
|
||||||
|
MetaCursorSprite *default_sprite;
|
||||||
|
|
||||||
MetaWaylandSurface *current;
|
MetaWaylandSurface *current;
|
||||||
guint32 pressed_buttons;
|
guint32 pressed_buttons;
|
||||||
|
Loading…
Reference in New Issue
Block a user