aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 7320e629..b296f1a8 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -117,11 +117,13 @@ static void set_fullscreen(struct sway_view *view, bool fullscreen) {
117} 117}
118 118
119static bool wants_floating(struct sway_view *view) { 119static bool wants_floating(struct sway_view *view) {
120 struct wlr_xdg_toplevel_v6_state *state = 120 struct wlr_xdg_toplevel_v6 *toplevel =
121 &view->wlr_xdg_surface_v6->toplevel->current; 121 view->wlr_xdg_surface_v6->toplevel;
122 return state->min_width != 0 && state->min_height != 0 122 struct wlr_xdg_toplevel_v6_state *state = &toplevel->current;
123 return (state->min_width != 0 && state->min_height != 0
123 && state->min_width == state->max_width 124 && state->min_width == state->max_width
124 && state->min_height == state->max_height; 125 && state->min_height == state->max_height)
126 || toplevel->parent;
125} 127}
126 128
127static void for_each_surface(struct sway_view *view, 129static void for_each_surface(struct sway_view *view,