mirror of
https://github.com/labwc/labwc.git
synced 2026-02-21 01:40:26 -05:00
cursor.c: Do not segfault on missing drag icon
Observed by moving tabs in chromium wayland native
(started with --ozone-platform-hint=wayland).
Backport of 47912aebb6
This commit is contained in:
parent
0284956ce8
commit
9cd502f0bf
1 changed files with 5 additions and 0 deletions
|
|
@ -378,6 +378,11 @@ start_drag(struct wl_listener *listener, void *data)
|
||||||
seat->pressed.view = NULL;
|
seat->pressed.view = NULL;
|
||||||
seat->pressed.surface = NULL;
|
seat->pressed.surface = NULL;
|
||||||
seat->drag_icon = wlr_drag->icon;
|
seat->drag_icon = wlr_drag->icon;
|
||||||
|
if (!seat->drag_icon) {
|
||||||
|
wlr_log(WLR_ERROR,
|
||||||
|
"Started drag but application did not set a drag icon");
|
||||||
|
return;
|
||||||
|
}
|
||||||
wl_signal_add(&seat->drag_icon->events.destroy, &seat->destroy_drag);
|
wl_signal_add(&seat->drag_icon->events.destroy, &seat->destroy_drag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue