diff options
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 95ca396c..8c8085f7 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -171,15 +171,6 @@ static bool wants_floating(struct sway_view *view) { | |||
171 | || toplevel->parent; | 171 | || toplevel->parent; |
172 | } | 172 | } |
173 | 173 | ||
174 | static bool has_client_side_decorations(struct sway_view *view) { | ||
175 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = | ||
176 | xdg_shell_v6_view_from_view(view); | ||
177 | if (xdg_shell_v6_view == NULL) { | ||
178 | return true; | ||
179 | } | ||
180 | return xdg_shell_v6_view->deco_mode != WLR_SERVER_DECORATION_MANAGER_MODE_SERVER; | ||
181 | } | ||
182 | |||
183 | static void for_each_surface(struct sway_view *view, | 174 | static void for_each_surface(struct sway_view *view, |
184 | wlr_surface_iterator_func_t iterator, void *user_data) { | 175 | wlr_surface_iterator_func_t iterator, void *user_data) { |
185 | if (xdg_shell_v6_view_from_view(view) == NULL) { | 176 | if (xdg_shell_v6_view_from_view(view) == NULL) { |
@@ -237,7 +228,6 @@ static const struct sway_view_impl view_impl = { | |||
237 | .set_tiled = set_tiled, | 228 | .set_tiled = set_tiled, |
238 | .set_fullscreen = set_fullscreen, | 229 | .set_fullscreen = set_fullscreen, |
239 | .wants_floating = wants_floating, | 230 | .wants_floating = wants_floating, |
240 | .has_client_side_decorations = has_client_side_decorations, | ||
241 | .for_each_surface = for_each_surface, | 231 | .for_each_surface = for_each_surface, |
242 | .for_each_popup = for_each_popup, | 232 | .for_each_popup = for_each_popup, |
243 | .close = _close, | 233 | .close = _close, |
@@ -382,15 +372,13 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
382 | view->natural_height = view->wlr_xdg_surface_v6->surface->current.height; | 372 | view->natural_height = view->wlr_xdg_surface_v6->surface->current.height; |
383 | } | 373 | } |
384 | 374 | ||
375 | view_map(view, view->wlr_xdg_surface_v6->surface); | ||
376 | |||
385 | struct sway_server_decoration *deco = | 377 | struct sway_server_decoration *deco = |
386 | decoration_from_surface(xdg_surface->surface); | 378 | decoration_from_surface(xdg_surface->surface); |
387 | if (deco != NULL) { | 379 | bool csd = !deco || deco->wlr_server_decoration->mode == |
388 | xdg_shell_v6_view->deco_mode = deco->wlr_server_decoration->mode; | 380 | WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; |
389 | } else { | 381 | view_set_csd_from_client(view, csd); |
390 | xdg_shell_v6_view->deco_mode = WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; | ||
391 | } | ||
392 | |||
393 | view_map(view, view->wlr_xdg_surface_v6->surface); | ||
394 | 382 | ||
395 | if (xdg_surface->toplevel->client_pending.fullscreen) { | 383 | if (xdg_surface->toplevel->client_pending.fullscreen) { |
396 | container_set_fullscreen(view->container, true); | 384 | container_set_fullscreen(view->container, true); |