aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 1e84e603..3b661046 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -20,6 +20,7 @@
20#include "sway/tree/arrange.h" 20#include "sway/tree/arrange.h"
21#include "sway/tree/view.h" 21#include "sway/tree/view.h"
22#include "sway/tree/workspace.h" 22#include "sway/tree/workspace.h"
23#include "sway/xdg_decoration.h"
23#include "list.h" 24#include "list.h"
24#include "log.h" 25#include "log.h"
25#include "stringop.h" 26#include "stringop.h"
@@ -835,7 +836,13 @@ void container_set_floating(struct sway_container *container, bool enable) {
835 if (container->view) { 836 if (container->view) {
836 view_set_tiled(container->view, false); 837 view_set_tiled(container->view, false);
837 if (container->view->using_csd) { 838 if (container->view->using_csd) {
839 container->saved_border = container->pending.border;
838 container->pending.border = B_CSD; 840 container->pending.border = B_CSD;
841 if (container->view->xdg_decoration) {
842 struct sway_xdg_decoration *deco = container->view->xdg_decoration;
843 wlr_xdg_toplevel_decoration_v1_set_mode(deco->wlr_xdg_decoration,
844 WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE);
845 }
839 } 846 }
840 } 847 }
841 container_floating_set_default_size(container); 848 container_floating_set_default_size(container);
@@ -873,6 +880,11 @@ void container_set_floating(struct sway_container *container, bool enable) {
873 view_set_tiled(container->view, true); 880 view_set_tiled(container->view, true);
874 if (container->view->using_csd) { 881 if (container->view->using_csd) {
875 container->pending.border = container->saved_border; 882 container->pending.border = container->saved_border;
883 if (container->view->xdg_decoration) {
884 struct sway_xdg_decoration *deco = container->view->xdg_decoration;
885 wlr_xdg_toplevel_decoration_v1_set_mode(deco->wlr_xdg_decoration,
886 WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
887 }
876 } 888 }
877 } 889 }
878 container->width_fraction = 0; 890 container->width_fraction = 0;