aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-10-03 13:03:06 +0200
committerLibravatar GitHub <noreply@github.com>2018-10-03 13:03:06 +0200
commit06c214a800cab9119ae4b04371e3f6bbca8a0550 (patch)
treeeed325e37d02fa71858a33e71ef33961395dd16f /sway/tree/container.c
parentMerge pull request #2755 from RyanDwyer/fix-tiling-criteria (diff)
parentRemove server-decoration assumption if view supports xdg-decoration (diff)
downloadsway-06c214a800cab9119ae4b04371e3f6bbca8a0550.tar.gz
sway-06c214a800cab9119ae4b04371e3f6bbca8a0550.tar.zst
sway-06c214a800cab9119ae4b04371e3f6bbca8a0550.zip
Merge pull request #2703 from RyanDwyer/csd-border
Add CSD to border modes
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index e1e616f9..a069b177 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -669,6 +669,9 @@ void container_set_floating(struct sway_container *container, bool enable) {
669 container_init_floating(container); 669 container_init_floating(container);
670 if (container->view) { 670 if (container->view) {
671 view_set_tiled(container->view, false); 671 view_set_tiled(container->view, false);
672 if (container->view->using_csd) {
673 container->view->border = B_CSD;
674 }
672 } 675 }
673 if (old_parent) { 676 if (old_parent) {
674 container_reap_empty(old_parent); 677 container_reap_empty(old_parent);
@@ -695,6 +698,9 @@ void container_set_floating(struct sway_container *container, bool enable) {
695 } 698 }
696 if (container->view) { 699 if (container->view) {
697 view_set_tiled(container->view, true); 700 view_set_tiled(container->view, true);
701 if (container->view->using_csd) {
702 container->view->border = container->view->saved_border;
703 }
698 } 704 }
699 container->is_sticky = false; 705 container->is_sticky = false;
700 } 706 }
@@ -715,7 +721,7 @@ void container_set_geometry_from_floating_view(struct sway_container *con) {
715 size_t border_width = 0; 721 size_t border_width = 0;
716 size_t top = 0; 722 size_t top = 0;
717 723
718 if (!view->using_csd) { 724 if (view->border != B_CSD) {
719 border_width = view->border_thickness * (view->border != B_NONE); 725 border_width = view->border_thickness * (view->border != B_NONE);
720 top = view->border == B_NORMAL ? 726 top = view->border == B_NORMAL ?
721 container_titlebar_height() : border_width; 727 container_titlebar_height() : border_width;