diff options
author | Simon Ser <contact@emersion.fr> | 2020-02-19 12:30:40 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2020-02-19 12:07:15 -0500 |
commit | f2a60d2d05366b824cda3762ecc33758b6d9ae53 (patch) | |
tree | cd11cbec732d67cd0ecf3f7767bc638a490c9809 /sway/desktop | |
parent | af294289b10ac4ae992f591be13ea4a1444e93e9 (diff) | |
download | sway-f2a60d2d05366b824cda3762ecc33758b6d9ae53.tar.xz |
Fix get_int_prop(WINDOW_TYPE) crash
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xwayland.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index e99fe06a..2554d0e4 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -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; } |