diff options
author | Justus Rossmeier <veecue@ventos.tk> | 2021-02-08 00:36:56 +0100 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2021-02-07 19:49:33 -0500 |
commit | b9e9e0e1333a10deaba7679066382b9dc4790d31 (patch) | |
tree | c7c778fab354b22bd305132666ba5f9b6c6d1c28 | |
parent | a02ac01be3e2029f6dcd5479c39ea30e6ea17594 (diff) |
tablet_v2: Fix implicit grab end detection
Store the previously focused surface in `state->focused` as well as in
`state->original` when starting an implicit grab. That way at the end
of an implicit grab, the detection whether the grab started and ended
on the same surface works as intended, even if the original surface was
never left at all.
-rw-r--r-- | types/tablet_v2/wlr_tablet_v2_tool.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c index 48348197..5ef19be8 100644 --- a/types/tablet_v2/wlr_tablet_v2_tool.c +++ b/types/tablet_v2/wlr_tablet_v2_tool.c @@ -848,6 +848,7 @@ void wlr_tablet_tool_v2_start_implicit_grab( } state->original = tool->focused_surface; + state->focused = tool->focused_surface; grab->data = state; wlr_tablet_tool_v2_start_grab(tool, grab); |