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.
This commit is contained in:
Justus Rossmeier 2021-02-08 00:36:56 +01:00 committed by Tudor Brindus
parent a02ac01be3
commit b9e9e0e133
1 changed files with 1 additions and 0 deletions

View File

@ -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);