aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-26 16:32:24 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit70f5d6fcf3219f122077b7e8d0b43a464f4e3fd4 (patch)
tree1364ee0111dd199dd457372b539107ce47d1190f /sway/tree/container.c
parentRemove check for if floating view intersects output (diff)
downloadsway-70f5d6fcf3219f122077b7e8d0b43a464f4e3fd4.tar.gz
sway-70f5d6fcf3219f122077b7e8d0b43a464f4e3fd4.tar.zst
sway-70f5d6fcf3219f122077b7e8d0b43a464f4e3fd4.zip
Rename container_set_geometry_from_view
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 7928ffc3..7430aebb 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -930,23 +930,23 @@ void container_set_floating(struct sway_container *container, bool enable) {
930 container_damage_whole(container); 930 container_damage_whole(container);
931} 931}
932 932
933void container_set_geometry_from_view(struct sway_container *container) { 933void container_set_geometry_from_floating_view(struct sway_container *con) {
934 if (!sway_assert(container->type == C_VIEW, "Expected a view")) { 934 if (!sway_assert(con->type == C_VIEW, "Expected a view")) {
935 return; 935 return;
936 } 936 }
937 if (!sway_assert(container_is_floating(container), 937 if (!sway_assert(container_is_floating(con),
938 "Expected a floating view")) { 938 "Expected a floating view")) {
939 return; 939 return;
940 } 940 }
941 struct sway_view *view = container->sway_view; 941 struct sway_view *view = con->sway_view;
942 size_t border_width = view->border_thickness * (view->border != B_NONE); 942 size_t border_width = view->border_thickness * (view->border != B_NONE);
943 size_t top = 943 size_t top =
944 view->border == B_NORMAL ? container_titlebar_height() : border_width; 944 view->border == B_NORMAL ? container_titlebar_height() : border_width;
945 945
946 container->x = view->x - border_width; 946 con->x = view->x - border_width;
947 container->y = view->y - top; 947 con->y = view->y - top;
948 container->width = view->width + border_width * 2; 948 con->width = view->width + border_width * 2;
949 container->height = top + view->height + border_width; 949 con->height = top + view->height + border_width;
950} 950}
951 951
952bool container_self_or_parent_floating(struct sway_container *container) { 952bool container_self_or_parent_floating(struct sway_container *container) {