Fix: corners in tabbed/stacked root containers (#413)
This commit is contained in:
parent
0a73788988
commit
8104856fb7
1 changed files with 12 additions and 4 deletions
|
@ -388,9 +388,18 @@ void container_arrange_title_bar(struct sway_container *con) {
|
||||||
con->corner_radius + con->current.border_thickness - thickness : 0;
|
con->corner_radius + con->current.border_thickness - thickness : 0;
|
||||||
enum corner_location corners = CORNER_LOCATION_TOP;
|
enum corner_location corners = CORNER_LOCATION_TOP;
|
||||||
|
|
||||||
|
enum sway_container_layout layout;
|
||||||
|
const list_t *siblings;
|
||||||
if (con->current.parent) {
|
if (con->current.parent) {
|
||||||
list_t *siblings = con->current.parent->current.children;
|
layout = con->current.parent->current.layout;
|
||||||
if (con->current.parent->current.layout == L_TABBED && siblings->length > 1) {
|
siblings = con->current.parent->current.children;
|
||||||
|
} else if (con->current.workspace) {
|
||||||
|
layout = con->current.workspace->layout;
|
||||||
|
siblings = con->current.workspace->tiling;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (con->current.parent || con->current.workspace) {
|
||||||
|
if (layout == L_TABBED && siblings->length > 1) {
|
||||||
if (siblings->items[0] == con) {
|
if (siblings->items[0] == con) {
|
||||||
corners = CORNER_LOCATION_TOP_LEFT;
|
corners = CORNER_LOCATION_TOP_LEFT;
|
||||||
} else if (siblings->items[siblings->length - 1] == con) {
|
} else if (siblings->items[siblings->length - 1] == con) {
|
||||||
|
@ -399,8 +408,7 @@ void container_arrange_title_bar(struct sway_container *con) {
|
||||||
background_corner_radius = 0;
|
background_corner_radius = 0;
|
||||||
corners = CORNER_LOCATION_NONE;
|
corners = CORNER_LOCATION_NONE;
|
||||||
}
|
}
|
||||||
} else if (con->current.parent->current.layout == L_STACKED &&
|
} else if (layout == L_STACKED && siblings->items[0] != con) {
|
||||||
siblings->items[0] != con) {
|
|
||||||
background_corner_radius = 0;
|
background_corner_radius = 0;
|
||||||
corners = CORNER_LOCATION_NONE;
|
corners = CORNER_LOCATION_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue