aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-05 11:02:31 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-05 11:02:31 -0500
commit8bdf3b1b0275d53cee8538777f12461603b0a751 (patch)
tree7f93aba35ba5c022d3d825bd6720aa4916adba49 /sway/tree
parentMerge pull request #1497 from emersion/cmd-exec (diff)
downloadsway-8bdf3b1b0275d53cee8538777f12461603b0a751.tar.gz
sway-8bdf3b1b0275d53cee8538777f12461603b0a751.tar.zst
sway-8bdf3b1b0275d53cee8538777f12461603b0a751.zip
view set position
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c5
-rw-r--r--sway/tree/layout.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index c7bce38a..e205fbcf 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -2,6 +2,7 @@
2#include <stdint.h> 2#include <stdint.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
5#include <wlr/types/wlr_output_layout.h>
5#include "sway/container.h" 6#include "sway/container.h"
6#include "sway/layout.h" 7#include "sway/layout.h"
7#include "sway/output.h" 8#include "sway/output.h"
@@ -53,6 +54,10 @@ swayc_t *new_output(struct sway_output *sway_output) {
53 output->width = size.width; 54 output->width = size.width;
54 output->height = size.width; 55 output->height = size.width;
55 56
57 // TODO configure output layout position
58 wlr_output_layout_add_auto(root_container.output_layout,
59 sway_output->wlr_output);
60
56 add_child(&root_container, output); 61 add_child(&root_container, output);
57 62
58 // Create workspace 63 // Create workspace
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 2d442f2a..cb39a361 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -215,8 +215,7 @@ static void apply_horiz_layout(swayc_t *container,
215 sway_log(L_DEBUG, 215 sway_log(L_DEBUG,
216 "Calculating arrangement for %p:%d (will scale %f by %f)", 216 "Calculating arrangement for %p:%d (will scale %f by %f)",
217 child, child->type, width, scale); 217 child, child->type, width, scale);
218 child->x = child_x; 218 child->sway_view->iface.set_position(child->sway_view, child_x, y);
219 child->y = y;
220 219
221 if (i == end - 1) { 220 if (i == end - 1) {
222 double remaining_width = x + width - child_x; 221 double remaining_width = x + width - child_x;
@@ -266,8 +265,7 @@ void apply_vert_layout(swayc_t *container,
266 sway_log(L_DEBUG, 265 sway_log(L_DEBUG,
267 "Calculating arrangement for %p:%d (will scale %f by %f)", 266 "Calculating arrangement for %p:%d (will scale %f by %f)",
268 child, child->type, height, scale); 267 child, child->type, height, scale);
269 child->x = x; 268 child->sway_view->iface.set_position(child->sway_view, x, child_y);
270 child->y = child_y;
271 269
272 if (i == end - 1) { 270 if (i == end - 1) {
273 double remaining_height = y + height - child_y; 271 double remaining_height = y + height - child_y;