mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 16:38:33 +02:00
libweston-desktop: Work around crash when opening popup menu
Fix a crash when right-clicking on a weston-terminal, where
weston_desktop_seat_popup_grab_add_surface() is called with
seat->popup_grab.keyboard.keyboard == NULL in case there is
no keyboard connected.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
(cherry picked from commit b72785e1f6)
This commit is contained in:
parent
ab1987f41e
commit
5324ace933
1 changed files with 6 additions and 0 deletions
|
|
@ -538,6 +538,9 @@ weston_desktop_seat_popup_grab_add_surface(struct weston_desktop_seat *seat,
|
|||
|
||||
wl_list_insert(&seat->popup_grab.surfaces, link);
|
||||
|
||||
if (!seat->popup_grab.keyboard.keyboard)
|
||||
return;
|
||||
|
||||
desktop_surface =
|
||||
weston_desktop_seat_popup_grab_get_topmost_surface(seat);
|
||||
surface = weston_desktop_surface_get_surface(desktop_surface);
|
||||
|
|
@ -558,6 +561,9 @@ weston_desktop_seat_popup_grab_remove_surface(struct weston_desktop_seat *seat,
|
|||
struct weston_desktop_surface *desktop_surface;
|
||||
struct weston_surface *surface;
|
||||
|
||||
if (!seat->popup_grab.keyboard.keyboard)
|
||||
return;
|
||||
|
||||
desktop_surface =
|
||||
weston_desktop_seat_popup_grab_get_topmost_surface(seat);
|
||||
surface = weston_desktop_surface_get_surface(desktop_surface);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue