aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-06 06:00:31 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-06-06 06:00:31 -0400
commit9f28366b558e27ef251268357bc31d2cc80b4f1d (patch)
tree38306d019572ba2e50f84d7a7cfa76752a64042b
parentd700bd2d7cf8848ba4c7ed84a454c074a27d9bb3 (diff)
wlr_tablet_v2_tool: Tablet tool surfaces are always mapped
-rw-r--r--types/tablet_v2/wlr_tablet_v2_tool.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c
index d9d14795..cbd98fe1 100644
--- a/types/tablet_v2/wlr_tablet_v2_tool.c
+++ b/types/tablet_v2/wlr_tablet_v2_tool.c
@@ -16,8 +16,15 @@
static const struct wlr_tablet_tool_v2_grab_interface default_tool_grab_interface;
+static void tablet_tool_cursor_surface_handle_commit(struct wlr_surface *surface) {
+ if (wlr_surface_has_buffer(surface)) {
+ wlr_surface_map(surface);
+ }
+}
+
static const struct wlr_surface_role tablet_tool_cursor_surface_role = {
.name = "wp_tablet_tool-cursor",
+ .commit = tablet_tool_cursor_surface_handle_commit,
};
static void handle_tablet_tool_v2_set_cursor(struct wl_client *client,
@@ -36,6 +43,8 @@ static void handle_tablet_tool_v2_set_cursor(struct wl_client *client,
surface_resource, ZWP_TABLET_TOOL_V2_ERROR_ROLE)) {
return;
}
+
+ tablet_tool_cursor_surface_handle_commit(surface);
}
struct wlr_tablet_v2_event_cursor evt = {