diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-05 11:02:31 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-05 11:02:31 -0500 |
commit | 8bdf3b1b0275d53cee8538777f12461603b0a751 (patch) | |
tree | 7f93aba35ba5c022d3d825bd6720aa4916adba49 /sway/tree | |
parent | 83b4c0648d75932c693b8636242202ea728035da (diff) | |
download | sway-8bdf3b1b0275d53cee8538777f12461603b0a751.tar.xz |
view set position
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 5 | ||||
-rw-r--r-- | sway/tree/layout.c | 6 |
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 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> +#include <wlr/types/wlr_output_layout.h> #include "sway/container.h" #include "sway/layout.h" #include "sway/output.h" @@ -53,6 +54,10 @@ swayc_t *new_output(struct sway_output *sway_output) { output->width = size.width; output->height = size.width; + // TODO configure output layout position + wlr_output_layout_add_auto(root_container.output_layout, + sway_output->wlr_output); + add_child(&root_container, output); // 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, sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %f by %f)", child, child->type, width, scale); - child->x = child_x; - child->y = y; + child->sway_view->iface.set_position(child->sway_view, child_x, y); if (i == end - 1) { double remaining_width = x + width - child_x; @@ -266,8 +265,7 @@ void apply_vert_layout(swayc_t *container, sway_log(L_DEBUG, "Calculating arrangement for %p:%d (will scale %f by %f)", child, child->type, height, scale); - child->x = x; - child->y = child_y; + child->sway_view->iface.set_position(child->sway_view, x, child_y); if (i == end - 1) { double remaining_height = y + height - child_y; |