add resize_hints config

This commit is contained in:
Julien Danjou 2007-09-10 12:01:36 +02:00
parent 7b165923a8
commit e3c0478434
4 changed files with 9 additions and 1 deletions

View File

@ -322,6 +322,9 @@ parse_config(Display * disp, int scr, DC * drawcontext, jdwm_config *jdwmconf)
/* mwfact */ /* mwfact */
jdwmconf->mwfact = config_lookup_float(&jdwmlibconf, "jdwm.mwfact"); jdwmconf->mwfact = config_lookup_float(&jdwmlibconf, "jdwm.mwfact");
/* resize_hints */
jdwmconf->resize_hints = config_lookup_float(&jdwmlibconf, "jdwm.resize_hints");
/* colors */ /* colors */
dc.norm[ColBorder] = initcolor(config_lookup_string(&jdwmlibconf, "jdwm.normal_border_color"), dc.norm[ColBorder] = initcolor(config_lookup_string(&jdwmlibconf, "jdwm.normal_border_color"),
disp, scr); disp, scr);

View File

@ -108,6 +108,8 @@ struct jdwm_config
int nmaster; int nmaster;
/** Transparency of unfocused clients */ /** Transparency of unfocused clients */
int opacity_unfocused; int opacity_unfocused;
/** Respect resize hints */
Bool resize_hints;
/** Text displayed in bar */ /** Text displayed in bar */
char statustext[256]; char statustext[256];
/** Current layout */ /** Current layout */

3
jdwmrc
View File

@ -36,6 +36,9 @@ jdwm:
# Number of master windows (used by tile layouts) # Number of master windows (used by tile layouts)
nmaster = 2; nmaster = 2;
# Resize hints
resize_hints = true;
# Set of rules to put some windows floating # Set of rules to put some windows floating
# or to tag them on launch # or to tag them on launch
rules = ({ name = "Gimp"; rules = ({ name = "Gimp";

View File

@ -122,7 +122,7 @@ _tile(jdwm_config *jdwmconf, const Bool right)
else else
nh = th - 2 * c->border; nh = th - 2 * c->border;
} }
resize(c, nx, ny, nw, nh, False); resize(c, nx, ny, nw, nh, jdwmconf->resize_hints);
if(n > nmaster && th != wah) if(n > nmaster && th != wah)
ny += nh + 2 * c->border; ny += nh + 2 * c->border;
i++; i++;