Merge pull request #2474 from RyanDwyer/transactionise-csd

Add using_csd variable to transaction state
This commit is contained in:
emersion 2018-08-17 13:33:21 +01:00 committed by GitHub
commit 782d0e087e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -83,6 +83,7 @@ struct sway_container_state {
bool border_bottom; bool border_bottom;
bool border_left; bool border_left;
bool border_right; bool border_right;
bool using_csd;
// Workspace properties // Workspace properties
struct sway_container *ws_fullscreen; struct sway_container *ws_fullscreen;

View File

@ -266,7 +266,7 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
render_view_toplevels(view, output, damage, view->swayc->alpha); render_view_toplevels(view, output, damage, view->swayc->alpha);
} }
if (view->using_csd) { if (view->swayc->current.using_csd) {
return; return;
} }
@ -585,7 +585,7 @@ static void render_container_simple(struct sway_output *output,
marks_texture = view->marks_unfocused; marks_texture = view->marks_unfocused;
} }
if (!view->using_csd) { if (!view->swayc->current.using_csd) {
if (state->border == B_NORMAL) { if (state->border == B_NORMAL) {
render_titlebar(output, damage, child, state->swayc_x, render_titlebar(output, damage, child, state->swayc_x,
state->swayc_y, state->swayc_width, colors, state->swayc_y, state->swayc_width, colors,
@ -777,7 +777,7 @@ static void render_floating_container(struct sway_output *soutput,
marks_texture = view->marks_unfocused; marks_texture = view->marks_unfocused;
} }
if (!view->using_csd) { if (!view->swayc->current.using_csd) {
if (con->current.border == B_NORMAL) { if (con->current.border == B_NORMAL) {
render_titlebar(soutput, damage, con, con->current.swayc_x, render_titlebar(soutput, damage, con, con->current.swayc_x,
con->current.swayc_y, con->current.swayc_width, colors, con->current.swayc_y, con->current.swayc_width, colors,

View File

@ -107,6 +107,7 @@ static void copy_pending_state(struct sway_container *container,
state->border_left = view->border_left; state->border_left = view->border_left;
state->border_right = view->border_right; state->border_right = view->border_right;
state->border_bottom = view->border_bottom; state->border_bottom = view->border_bottom;
state->using_csd = view->using_csd;
} else if (container->type == C_WORKSPACE) { } else if (container->type == C_WORKSPACE) {
state->ws_fullscreen = container->sway_workspace->fullscreen; state->ws_fullscreen = container->sway_workspace->fullscreen;
state->ws_floating = container->sway_workspace->floating; state->ws_floating = container->sway_workspace->floating;