Allow to disable resize hints in floating layout with settings
This commit is contained in:
parent
53e0462a31
commit
cc3de5771b
10
dwm.c
10
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 */
|
||||
|
|
11
settings.c
11
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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue