mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-08 08:21:12 -04:00
view: require non-NULL surface in view_from_wlr_surface
This commit is contained in:
parent
f8e3d167d4
commit
fd33d2b5aa
2 changed files with 5 additions and 4 deletions
3
seat.c
3
seat.c
|
|
@ -817,6 +817,9 @@ struct cg_view *
|
|||
seat_get_focus(struct cg_seat *seat)
|
||||
{
|
||||
struct wlr_surface *prev_surface = seat->seat->keyboard_state.focused_surface;
|
||||
if (!prev_surface) {
|
||||
return NULL;
|
||||
}
|
||||
return view_from_wlr_surface(prev_surface);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue