]> git.mdlowis.com Git - proto/labwc.git/commit
src/view.c: Prevent crash by killing a moving application
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 10 Jul 2022 21:24:32 +0000 (23:24 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 11 Jul 2022 14:58:33 +0000 (15:58 +0100)
commitf1ba0a89fc6af3c9a927e8a07ebfd612191b07ed
tree7ea1b02394f6e3c6e68d732287576c09c3efcd76
parent1f0055a7e003f3eaf961e87d874565692ca49887
src/view.c: Prevent crash by killing a moving application

When a view is destroyed labwc calls interactive_end(view) which
may reposition the view which is partly destroyed and doesn't own
any surface anymore. To prevent this scenario from happening don't
call interactive_end() at all and just reset server->grabbed_view
and server->input_mode directly.

Before this patch, the bug could be reproduced by:
- xcalc &
- sleep 5; killall xcalc
- move the xcalc window completely to one of the edges

The change in src/xwayland.c is not required for this bug
to be fixed but may prevent something similar in the future.
src/view.c
src/xwayland.c