summaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-06 19:19:30 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-09 10:08:43 +1000
commitf9e6d703d298dbdee0770fd9e0c64ab2d7ac7deb (patch)
tree8c8ffd879e368aff3d749a637aabfa784800db5c /sway/desktop/output.c
parentWIP: Atomic layout updates ground work (diff)
downloadsway-f9e6d703d298dbdee0770fd9e0c64ab2d7ac7deb.tar.gz
sway-f9e6d703d298dbdee0770fd9e0c64ab2d7ac7deb.tar.zst
sway-f9e6d703d298dbdee0770fd9e0c64ab2d7ac7deb.zip
Make main properties be the pending state
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index c5d445a6..8af05bc3 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -774,9 +774,10 @@ static void render_container_stacked(struct sway_output *output,
774 marks_texture = view ? view->marks_unfocused : NULL; 774 marks_texture = view ? view->marks_unfocused : NULL;
775 } 775 }
776 776
777 int y = con->y + container_titlebar_height() * i; 777 int y = con->current.swayc_y + container_titlebar_height() * i;
778 render_titlebar(output, damage, child, child->x, y, child->width, 778 render_titlebar(output, damage, child, child->current.swayc_x, y,
779 colors, title_texture, marks_texture); 779 child->current.swayc_width, colors,
780 title_texture, marks_texture);
780 781
781 if (child == current) { 782 if (child == current) {
782 current_colors = colors; 783 current_colors = colors;
@@ -795,7 +796,7 @@ static void render_container_stacked(struct sway_output *output,
795static void render_container(struct sway_output *output, 796static void render_container(struct sway_output *output,
796 pixman_region32_t *damage, struct sway_container *con, 797 pixman_region32_t *damage, struct sway_container *con,
797 bool parent_focused) { 798 bool parent_focused) {
798 switch (con->layout) { 799 switch (con->current.layout) {
799 case L_NONE: 800 case L_NONE:
800 case L_HORIZ: 801 case L_HORIZ:
801 case L_VERT: 802 case L_VERT:
@@ -832,9 +833,10 @@ static void render_floating_container(struct sway_output *soutput,
832 marks_texture = view->marks_unfocused; 833 marks_texture = view->marks_unfocused;
833 } 834 }
834 835
835 if (con->sway_view->border == B_NORMAL) { 836 if (con->current.border == B_NORMAL) {
836 render_titlebar(soutput, damage, con, con->x, con->y, con->width, 837 render_titlebar(soutput, damage, con, con->current.swayc_x,
837 colors, title_texture, marks_texture); 838 con->current.swayc_y, con->current.swayc_width, colors,
839 title_texture, marks_texture);
838 } else { 840 } else {
839 render_top_border(soutput, damage, con, colors); 841 render_top_border(soutput, damage, con, colors);
840 } 842 }
@@ -1184,8 +1186,8 @@ void output_damage_from_view(struct sway_output *output,
1184void output_damage_box(struct sway_output *output, struct wlr_box *_box) { 1186void output_damage_box(struct sway_output *output, struct wlr_box *_box) {
1185 struct wlr_box box; 1187 struct wlr_box box;
1186 memcpy(&box, _box, sizeof(struct wlr_box)); 1188 memcpy(&box, _box, sizeof(struct wlr_box));
1187 box.x -= output->swayc->x; 1189 box.x -= output->swayc->current.swayc_x;
1188 box.y -= output->swayc->y; 1190 box.y -= output->swayc->current.swayc_y;
1189 scale_box(&box, output->wlr_output->scale); 1191 scale_box(&box, output->wlr_output->scale);
1190 wlr_output_damage_add_box(output->damage, &box); 1192 wlr_output_damage_add_box(output->damage, &box);
1191} 1193}
@@ -1204,10 +1206,10 @@ static void output_damage_whole_container_iterator(struct sway_container *con,
1204void output_damage_whole_container(struct sway_output *output, 1206void output_damage_whole_container(struct sway_output *output,
1205 struct sway_container *con) { 1207 struct sway_container *con) {
1206 struct wlr_box box = { 1208 struct wlr_box box = {
1207 .x = con->x - output->wlr_output->lx, 1209 .x = con->current.swayc_x - output->wlr_output->lx,
1208 .y = con->y - output->wlr_output->ly, 1210 .y = con->current.swayc_y - output->wlr_output->ly,
1209 .width = con->width, 1211 .width = con->current.swayc_width,
1210 .height = con->height, 1212 .height = con->current.swayc_height,
1211 }; 1213 };
1212 scale_box(&box, output->wlr_output->scale); 1214 scale_box(&box, output->wlr_output->scale);
1213 wlr_output_damage_add_box(output->damage, &box); 1215 wlr_output_damage_add_box(output->damage, &box);