add new_become_master option to disable new client becoming automaticaly master
This commit is contained in:
parent
8978f0837e
commit
1d08ed45a8
|
@ -252,6 +252,7 @@ screen <integer> [MULTI]
|
||||||
{
|
{
|
||||||
allow_lower_floats=<{true,false}>
|
allow_lower_floats=<{true,false}>
|
||||||
sloppy_focus=<{true,false}>
|
sloppy_focus=<{true,false}>
|
||||||
|
new_become_master<{true,false}>
|
||||||
border=<integer>
|
border=<integer>
|
||||||
focus_move_pointer=<{true,false}>
|
focus_move_pointer=<{true,false}>
|
||||||
font=<font>
|
font=<font>
|
||||||
|
|
6
client.c
6
client.c
|
@ -321,7 +321,6 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
||||||
c->h = c->rh = wa->height;
|
c->h = c->rh = wa->height;
|
||||||
c->oldborder = wa->border_width;
|
c->oldborder = wa->border_width;
|
||||||
|
|
||||||
globalconf.display = globalconf.display;
|
|
||||||
c->screen = get_screen_bycoord(c->x, c->y);
|
c->screen = get_screen_bycoord(c->x, c->y);
|
||||||
|
|
||||||
move_client_to_screen(c, screen, True);
|
move_client_to_screen(c, screen, True);
|
||||||
|
@ -408,7 +407,12 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!rule)
|
if(!rule)
|
||||||
|
{
|
||||||
|
if(globalconf.screens[c->screen].new_become_master)
|
||||||
client_attach(c);
|
client_attach(c);
|
||||||
|
else
|
||||||
|
client_attach_at_end(c);
|
||||||
|
}
|
||||||
|
|
||||||
/* some windows require this */
|
/* some windows require this */
|
||||||
XMoveResizeWindow(globalconf.display, c->win, c->x, c->y, c->w, c->h);
|
XMoveResizeWindow(globalconf.display, c->win, c->x, c->y, c->w, c->h);
|
||||||
|
|
2
config.c
2
config.c
|
@ -346,6 +346,7 @@ config_parse_screen(cfg_t *cfg, int screen)
|
||||||
virtscreen->focus_move_pointer = cfg_getbool(cfg_general, "focus_move_pointer");
|
virtscreen->focus_move_pointer = cfg_getbool(cfg_general, "focus_move_pointer");
|
||||||
virtscreen->allow_lower_floats = cfg_getbool(cfg_general, "allow_lower_floats");
|
virtscreen->allow_lower_floats = cfg_getbool(cfg_general, "allow_lower_floats");
|
||||||
virtscreen->sloppy_focus = cfg_getbool(cfg_general, "sloppy_focus");
|
virtscreen->sloppy_focus = cfg_getbool(cfg_general, "sloppy_focus");
|
||||||
|
virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master");
|
||||||
virtscreen->font = XftFontOpenName(globalconf.display,
|
virtscreen->font = XftFontOpenName(globalconf.display,
|
||||||
phys_screen,
|
phys_screen,
|
||||||
cfg_getstr(cfg_general, "font"));
|
cfg_getstr(cfg_general, "font"));
|
||||||
|
@ -479,6 +480,7 @@ config_parse(const char *confpatharg)
|
||||||
CFG_BOOL((char *) "focus_move_pointer", cfg_false, CFGF_NONE),
|
CFG_BOOL((char *) "focus_move_pointer", cfg_false, CFGF_NONE),
|
||||||
CFG_BOOL((char *) "allow_lower_floats", cfg_false, CFGF_NONE),
|
CFG_BOOL((char *) "allow_lower_floats", cfg_false, CFGF_NONE),
|
||||||
CFG_BOOL((char *) "sloppy_focus", cfg_true, CFGF_NONE),
|
CFG_BOOL((char *) "sloppy_focus", cfg_true, CFGF_NONE),
|
||||||
|
CFG_BOOL((char *) "new_become_master", cfg_true, CFGF_NONE),
|
||||||
CFG_STR((char *) "font", (char *) "mono-12", CFGF_NONE),
|
CFG_STR((char *) "font", (char *) "mono-12", CFGF_NONE),
|
||||||
CFG_END()
|
CFG_END()
|
||||||
};
|
};
|
||||||
|
|
2
config.h
2
config.h
|
@ -243,6 +243,8 @@ typedef struct
|
||||||
Bool resize_hints;
|
Bool resize_hints;
|
||||||
/** Sloppy focus: focus follow mouse */
|
/** Sloppy focus: focus follow mouse */
|
||||||
Bool sloppy_focus;
|
Bool sloppy_focus;
|
||||||
|
/** True if new clients should become master */
|
||||||
|
Bool new_become_master;
|
||||||
/** Normal colors */
|
/** Normal colors */
|
||||||
XColor colors_normal[ColLast];
|
XColor colors_normal[ColLast];
|
||||||
/** Selected colors */
|
/** Selected colors */
|
||||||
|
|
Loading…
Reference in New Issue