diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index b076d772..0f45399d 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -117,11 +117,12 @@ static void set_fullscreen(struct sway_view *view, bool fullscreen) { | |||
117 | } | 117 | } |
118 | 118 | ||
119 | static bool wants_floating(struct sway_view *view) { | 119 | static bool wants_floating(struct sway_view *view) { |
120 | struct wlr_xdg_toplevel_state *state = | 120 | struct wlr_xdg_toplevel *toplevel = view->wlr_xdg_surface->toplevel; |
121 | &view->wlr_xdg_surface->toplevel->current; | 121 | struct wlr_xdg_toplevel_state *state = &toplevel->current; |
122 | return state->min_width != 0 && state->min_height != 0 | 122 | return (state->min_width != 0 && state->min_height != 0 |
123 | && state->min_width == state->max_width | 123 | && state->min_width == state->max_width |
124 | && state->min_height == state->max_height; | 124 | && state->min_height == state->max_height) |
125 | || toplevel->parent; | ||
125 | } | 126 | } |
126 | 127 | ||
127 | static void for_each_surface(struct sway_view *view, | 128 | static void for_each_surface(struct sway_view *view, |