[mutter/wip/carlosg/tablet-cursor-surface-events: 169/169] wayland: Update tablet cursor outputs across cursor/proximity changes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/tablet-cursor-surface-events: 169/169] wayland: Update tablet cursor outputs across cursor/proximity changes
- Date: Fri, 31 May 2019 09:57:46 +0000 (UTC)
commit 1da0355528dc8eb06aef0f995f203a484840947d
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Apr 18 19:21:37 2019 +0200
wayland: Update tablet cursor outputs across cursor/proximity changes
Make sure those generic surface events are sent early on when setting a
cursor for any tablet tool, so clients can update to output characteristics.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/545
Related: https://gitlab.gnome.org/GNOME/gtk/issues/1675
src/wayland/meta-wayland-tablet-tool.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c
index ffc05a63a..d243608cf 100644
--- a/src/wayland/meta-wayland-tablet-tool.c
+++ b/src/wayland/meta-wayland-tablet-tool.c
@@ -115,13 +115,24 @@ meta_wayland_tablet_tool_set_cursor_surface (MetaWaylandTabletTool *tool,
return;
if (tool->cursor_surface)
- wl_list_remove (&tool->cursor_surface_destroy_listener.link);
+ {
+ MetaWaylandCursorSurface *cursor_surface;
+
+ cursor_surface = META_WAYLAND_CURSOR_SURFACE (tool->cursor_surface->role);
+ meta_wayland_cursor_surface_set_renderer (cursor_surface, NULL);
+
+ meta_wayland_surface_update_outputs (tool->cursor_surface);
+ wl_list_remove (&tool->cursor_surface_destroy_listener.link);
+ }
tool->cursor_surface = surface;
if (tool->cursor_surface)
- wl_resource_add_destroy_listener (tool->cursor_surface->resource,
- &tool->cursor_surface_destroy_listener);
+ {
+ meta_wayland_surface_update_outputs (tool->cursor_surface);
+ wl_resource_add_destroy_listener (tool->cursor_surface->resource,
+ &tool->cursor_surface_destroy_listener);
+ }
meta_wayland_tablet_tool_update_cursor_surface (tool);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]