mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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.
This commit is contained in:
parent
1f0055a7e0
commit
f1ba0a89fc
2 changed files with 21 additions and 6 deletions
|
|
@ -209,6 +209,10 @@ handle_set_class(struct wl_listener *listener, void *data)
|
|||
static void
|
||||
configure(struct view *view, struct wlr_box geo)
|
||||
{
|
||||
if (!view->xwayland_surface) {
|
||||
wlr_log(WLR_ERROR, "Not configuring view without xwayland_surface");
|
||||
return;
|
||||
}
|
||||
view->pending_move_resize.update_x = geo.x != view->x;
|
||||
view->pending_move_resize.update_y = geo.y != view->y;
|
||||
view->pending_move_resize.x = geo.x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue