Conf: Add option resize_transparent in misc section for light client resize.

This commit is contained in:
Martin Duquesnoy 2009-04-22 10:39:39 +02:00
parent 2741bb71de
commit 12fc19d1b0
4 changed files with 15 additions and 7 deletions

View File

@ -125,9 +125,10 @@ conf_alias_section(cfg_t *cfg_a)
void
conf_misc_section(cfg_t *cfg_m)
{
conf.font = alias_to_str(_strdup(cfg_getstr(cfg_m, "font")));
conf.raisefocus = cfg_getbool(cfg_m, "raisefocus");
conf.raiseswitch = cfg_getbool(cfg_m, "raiseswitch");
conf.font = alias_to_str(_strdup(cfg_getstr(cfg_m, "font")));
conf.raisefocus = cfg_getbool(cfg_m, "raisefocus");
conf.raiseswitch = cfg_getbool(cfg_m, "raiseswitch");
conf.resize_transparent = cfg_getbool(cfg_m, "resize_transparent");
return;
}

View File

@ -39,9 +39,10 @@ char final_path[128];
cfg_opt_t misc_opts[] =
{
CFG_STR("font", "sans-9", CFGF_NONE),
CFG_BOOL("raisefocus", cfg_false, CFGF_NONE),
CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE),
CFG_STR("font", "sans-9", CFGF_NONE),
CFG_BOOL("raisefocus", cfg_false, CFGF_NONE),
CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE),
CFG_BOOL("resize_transparent", cfg_false, CFGF_NONE),
CFG_END()
};

View File

@ -169,7 +169,8 @@ mouse_resize(Client *c)
geo.width = ((ev.xmotion.x - ocx < 1) ? 1 : ev.xmotion.x - ocx);
geo.height = ((ev.xmotion.y - ocy < 1) ? 1 : ev.xmotion.y - ocy);
client_moveresize(c, geo, True);
if(!conf.resize_transparent)
client_moveresize(c, geo, True);
XSync(dpy, False);
}
@ -181,9 +182,13 @@ mouse_resize(Client *c)
while(ev.type != ButtonRelease);
if(!c->tile)
{
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->geo.width + conf.client.borderheight, c->geo.height);
client_moveresize(c, geo, True);
}
else
tags[selscreen][seltag[selscreen]].layout.func(c->screen);
XUngrabPointer(dpy, CurrentTime);

View File

@ -274,6 +274,7 @@ typedef struct
char *font;
Bool raisefocus;
Bool raiseswitch;
Bool resize_transparent;
struct
{
/*