diff --git a/dwm.c b/dwm.c index 6d6c344..810d4cf 100644 --- a/dwm.c +++ b/dwm.c @@ -386,7 +386,15 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int bw, int interact) *h = bh; if (*w < bh) *w = bh; - if (c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) { + if ( + c->isfloating + || + ( + settings_get_respect_resize_hints_in_floating_layout() + && + !c->mon->lt[c->mon->sellt]->arrange + ) + ) { /* see last two sentences in ICCCM 4.1.2.3 */ baseismin = c->basew == c->minw && c->baseh == c->minh; if (!baseismin) { /* temporarily remove base dimensions */ diff --git a/settings.c b/settings.c index f035d0e..d82caa8 100644 --- a/settings.c +++ b/settings.c @@ -1,6 +1,7 @@ #include "settings.h" static bool focus_on_wheel = true; +static bool respect_resize_hints_in_floating_layout = false; bool settings_get_focus_on_wheel() { @@ -11,3 +12,13 @@ void settings_set_focus_on_wheel(const bool new_focus_on_wheel) { focus_on_wheel = new_focus_on_wheel; } + +bool settings_get_respect_resize_hints_in_floating_layout() +{ + return respect_resize_hints_in_floating_layout; +} + +void settings_set_respect_resize_hints_in_floating_layout(const bool new_respect_resize_hints_in_floating_layout) +{ + respect_resize_hints_in_floating_layout = new_respect_resize_hints_in_floating_layout; +} diff --git a/settings.h b/settings.h index 09ae635..6fd502a 100644 --- a/settings.h +++ b/settings.h @@ -6,4 +6,7 @@ bool settings_get_focus_on_wheel(); void settings_set_focus_on_wheel(bool new_focus_on_wheel); +bool settings_get_respect_resize_hints_in_floating_layout(); +void settings_set_respect_resize_hints_in_floating_layout(bool new_respect_resize_hints_in_floating_layout); + #endif // _SETTINGS_H