]> git.mdlowis.com Git - proto/labwc.git/commitdiff
input: send tablet proximity-in only above a valid surface
authorJens Peters <jp7677@gmail.com>
Tue, 28 May 2024 18:35:26 +0000 (20:35 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 28 May 2024 20:05:06 +0000 (22:05 +0200)
A resize with a tablet tool might end above a
non-tablet capable surface, discard the
proximity-in in that case.

src/input/tablet.c

index a307abe6bceeffd9646440648e17e27a066c907b..79018ec1ed58f07d4be45f347137b06a25a5c22b 100644 (file)
@@ -403,10 +403,11 @@ handle_tip(struct wl_listener *listener, void *data)
                        }
 
                        bool exit_interactive = cursor_finish_button_release(tool->seat);
-                       if (exit_interactive && tool->tool_v2->focused_surface) {
+                       if (exit_interactive && surface && tool->tool_v2->focused_surface) {
                                /*
                                 * Re-enter the surface after a resize/move to ensure
-                                * being back in tablet mode.
+                                * being back in tablet mode, but only if we are still
+                                * above a tablet capable surface.
                                 */
                                wlr_tablet_v2_tablet_tool_notify_proximity_out(tool->tool_v2);
                                wlr_tablet_v2_tablet_tool_notify_proximity_in(tool->tool_v2,