Don't apply hide_edge_borders to floating windows

This change matches i3's behavior.
This commit is contained in:
mwenzkowski 2019-04-16 21:20:48 +02:00 committed by Brian Ashworth
parent e9e1fbc501
commit 9ac2342a67

View file

@ -221,8 +221,10 @@ void view_autoconfigure(struct sway_view *view) {
con->border_top = con->border_bottom = true; con->border_top = con->border_bottom = true;
con->border_left = con->border_right = true; con->border_left = con->border_right = true;
double y_offset = 0;
if (!container_is_floating(con) && ws) {
if (ws) {
bool smart = config->hide_edge_borders == E_SMART || bool smart = config->hide_edge_borders == E_SMART ||
(config->hide_edge_borders == E_SMART_NO_GAPS && (config->hide_edge_borders == E_SMART_NO_GAPS &&
!gaps_to_edge(view)); !gaps_to_edge(view));
@ -240,9 +242,6 @@ void view_autoconfigure(struct sway_view *view) {
int bottom_y = con->y + con->height + con->current_gaps.bottom; int bottom_y = con->y + con->height + con->current_gaps.bottom;
con->border_bottom = bottom_y != ws->y + ws->height; con->border_bottom = bottom_y != ws->y + ws->height;
} }
}
double y_offset = 0;
// In a tabbed or stacked container, the container's y is the top of the // In a tabbed or stacked container, the container's y is the top of the
// title area. We have to offset the surface y by the height of the title, // title area. We have to offset the surface y by the height of the title,
@ -250,7 +249,7 @@ void view_autoconfigure(struct sway_view *view) {
list_t *siblings = container_get_siblings(con); list_t *siblings = container_get_siblings(con);
bool show_titlebar = (siblings && siblings->length > 1) bool show_titlebar = (siblings && siblings->length > 1)
|| !config->hide_lone_tab; || !config->hide_lone_tab;
if (show_titlebar && !container_is_floating(con)) { if (show_titlebar) {
enum sway_container_layout layout = container_parent_layout(con); enum sway_container_layout layout = container_parent_layout(con);
if (layout == L_TABBED) { if (layout == L_TABBED) {
y_offset = container_titlebar_height(); y_offset = container_titlebar_height();
@ -260,6 +259,7 @@ void view_autoconfigure(struct sway_view *view) {
con->border_top = false; con->border_top = false;
} }
} }
}
double x, y, width, height; double x, y, width, height;
switch (con->border) { switch (con->border) {