Bugfix for previous commit: Don’t crash with dock windows
This commit is contained in:
parent
57effd65b2
commit
506b7f4004
|
@ -936,8 +936,12 @@ Con *con_descend_direction(Con *con, direction_t direction) {
|
||||||
Rect con_border_style_rect(Con *con) {
|
Rect con_border_style_rect(Con *con) {
|
||||||
adjacent_t borders_to_hide = ADJ_NONE;
|
adjacent_t borders_to_hide = ADJ_NONE;
|
||||||
Rect result;
|
Rect result;
|
||||||
|
/* Shortcut to avoid calling con_adjacent_borders() on dock containers. */
|
||||||
|
int border_style = con_border_style(con);
|
||||||
|
if (border_style == BS_NONE)
|
||||||
|
return (Rect){ 0, 0, 0, 0 };
|
||||||
borders_to_hide = con_adjacent_borders(con) & config.hide_edge_borders;
|
borders_to_hide = con_adjacent_borders(con) & config.hide_edge_borders;
|
||||||
switch (con_border_style(con)) {
|
switch (border_style) {
|
||||||
case BS_NORMAL:
|
case BS_NORMAL:
|
||||||
result = (Rect){2, 0, -(2 * 2), -2};
|
result = (Rect){2, 0, -(2 * 2), -2};
|
||||||
if (borders_to_hide & ADJ_LEFT_SCREEN_EDGE) {
|
if (borders_to_hide & ADJ_LEFT_SCREEN_EDGE) {
|
||||||
|
|
3
src/x.c
3
src/x.c
|
@ -305,13 +305,14 @@ void x_draw_decoration(Con *con) {
|
||||||
* • non-leaf containers which are in a stacked/tabbed container
|
* • non-leaf containers which are in a stacked/tabbed container
|
||||||
*
|
*
|
||||||
* It does not need to run for:
|
* It does not need to run for:
|
||||||
* • direct children of outputs
|
* • direct children of outputs or dockareas
|
||||||
* • floating containers (they don’t have a decoration)
|
* • floating containers (they don’t have a decoration)
|
||||||
*/
|
*/
|
||||||
if ((!leaf &&
|
if ((!leaf &&
|
||||||
parent->layout != L_STACKED &&
|
parent->layout != L_STACKED &&
|
||||||
parent->layout != L_TABBED) ||
|
parent->layout != L_TABBED) ||
|
||||||
parent->type == CT_OUTPUT ||
|
parent->type == CT_OUTPUT ||
|
||||||
|
parent->type == CT_DOCKAREA ||
|
||||||
con->type == CT_FLOATING_CON)
|
con->type == CT_FLOATING_CON)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue