aboutsummaryrefslogtreecommitdiffstats
path: root/sway/layout.c
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-20 09:52:54 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-20 09:52:54 -0700
commit36e07e9ebc55b3fc8a8b8cd76ee743202691ad56 (patch)
treee9e2a9d9db46044ab7cd7bd4dcb7ca2650a89f70 /sway/layout.c
parentMerge pull request #75 from minus7/ipc (diff)
downloadsway-36e07e9ebc55b3fc8a8b8cd76ee743202691ad56.tar.gz
sway-36e07e9ebc55b3fc8a8b8cd76ee743202691ad56.tar.zst
sway-36e07e9ebc55b3fc8a8b8cd76ee743202691ad56.zip
find_parent_by_type
Diffstat (limited to 'sway/layout.c')
-rw-r--r--sway/layout.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 78b3dd27..8c011fdb 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -161,10 +161,7 @@ void arrange_windows(swayc_t *container, int width, int height) {
161 } 161 }
162 }; 162 };
163 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) { 163 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {
164 swayc_t *parent = container; 164 swayc_t *parent = swayc_parent_by_type(container, C_OUTPUT);
165 while (parent->type != C_OUTPUT) {
166 parent = parent->parent;
167 }
168 geometry.origin.x = 0; 165 geometry.origin.x = 0;
169 geometry.origin.y = 0; 166 geometry.origin.y = 0;
170 geometry.size.w = parent->width; 167 geometry.size.w = parent->width;
@@ -263,10 +260,7 @@ void arrange_windows(swayc_t *container, int width, int height) {
263 } 260 }
264 }; 261 };
265 if (wlc_view_get_state(view->handle) & WLC_BIT_FULLSCREEN) { 262 if (wlc_view_get_state(view->handle) & WLC_BIT_FULLSCREEN) {
266 swayc_t *parent = view; 263 swayc_t *parent = swayc_parent_by_type(view, C_OUTPUT);
267 while (parent->type != C_OUTPUT) {
268 parent = parent->parent;
269 }
270 geometry.origin.x = 0; 264 geometry.origin.x = 0;
271 geometry.origin.y = 0; 265 geometry.origin.y = 0;
272 geometry.size.w = parent->width; 266 geometry.size.w = parent->width;