aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-17 10:14:33 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-17 10:14:33 +1000
commit75c699db62e63e2a3c2aa652c9ba9482a8f13ec3 (patch)
treef8b454f2e07f894443cfa76ab48ae0e3fa372829 /sway/desktop
parent7268d544c23305dbc0e787143f5b622cb2edbd12 (diff)
Implement default_floating_border command and adjust CSD behaviour
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/render.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index cb995215..4c85e516 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -256,6 +256,10 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
render_view_surfaces(view, output, damage, view->swayc->alpha);
}
+ if (view->using_csd) {
+ return;
+ }
+
struct wlr_box box;
float output_scale = output->wlr_output->scale;
float color[4];
@@ -571,12 +575,14 @@ static void render_container_simple(struct sway_output *output,
marks_texture = view->marks_unfocused;
}
- if (state->border == B_NORMAL) {
- render_titlebar(output, damage, child, state->swayc_x,
- state->swayc_y, state->swayc_width, colors,
- title_texture, marks_texture);
- } else {
- render_top_border(output, damage, child, colors);
+ if (!view->using_csd) {
+ if (state->border == B_NORMAL) {
+ render_titlebar(output, damage, child, state->swayc_x,
+ state->swayc_y, state->swayc_width, colors,
+ title_texture, marks_texture);
+ } else {
+ render_top_border(output, damage, child, colors);
+ }
}
render_view(output, damage, child, colors);
} else {
@@ -761,12 +767,14 @@ static void render_floating_container(struct sway_output *soutput,
marks_texture = view->marks_unfocused;
}
- if (con->current.border == B_NORMAL) {
- render_titlebar(soutput, damage, con, con->current.swayc_x,
- con->current.swayc_y, con->current.swayc_width, colors,
- title_texture, marks_texture);
- } else if (con->current.border != B_NONE) {
- render_top_border(soutput, damage, con, colors);
+ if (!view->using_csd) {
+ if (con->current.border == B_NORMAL) {
+ render_titlebar(soutput, damage, con, con->current.swayc_x,
+ con->current.swayc_y, con->current.swayc_width, colors,
+ title_texture, marks_texture);
+ } else if (con->current.border != B_NONE) {
+ render_top_border(soutput, damage, con, colors);
+ }
}
render_view(soutput, damage, con, colors);
} else {