mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 23:47:21 +01:00
Fix get_int_prop(WINDOW_TYPE) crash
This commit is contained in:
parent
af294289b1
commit
f2a60d2d05
1 changed files with 4 additions and 1 deletions
|
@ -178,7 +178,10 @@ static uint32_t get_int_prop(struct sway_view *view, enum sway_view_prop prop) {
|
|||
}
|
||||
return 0;
|
||||
case VIEW_PROP_WINDOW_TYPE:
|
||||
return *view->wlr_xwayland_surface->window_type;
|
||||
if (view->wlr_xwayland_surface->window_type_len == 0) {
|
||||
return 0;
|
||||
}
|
||||
return view->wlr_xwayland_surface->window_type[0];
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue