diff --git a/awesomerc.1.txt b/awesomerc.1.txt index 74b35216..89cc4c44 100644 --- a/awesomerc.1.txt +++ b/awesomerc.1.txt @@ -332,7 +332,6 @@ screen [MULTI] { general { - allow_lower_floats = border = focus_move_pointer = font = @@ -340,6 +339,7 @@ screen [MULTI] new_get_focus = resize_hints = sloppy_focus = + sloppy_focus_raise = snap = } tags diff --git a/config.c b/config.c index 394c2358..b1448959 100644 --- a/config.c +++ b/config.c @@ -314,6 +314,7 @@ config_parse_screen(cfg_t *cfg, int screen) virtscreen->resize_hints = cfg_getbool(cfg_general, "resize_hints"); virtscreen->focus_move_pointer = cfg_getbool(cfg_general, "focus_move_pointer"); virtscreen->sloppy_focus = cfg_getbool(cfg_general, "sloppy_focus"); + virtscreen->sloppy_focus_raise = cfg_getbool(cfg_general, "sloppy_focus_raise"); virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master"); virtscreen->new_get_focus = cfg_getbool(cfg_general, "new_get_focus"); virtscreen->font = XftFontOpenName(globalconf.display, @@ -442,6 +443,7 @@ config_parse(const char *confpatharg) CFG_BOOL((char *) "resize_hints", cfg_true, CFGF_NONE), CFG_BOOL((char *) "focus_move_pointer", cfg_false, CFGF_NONE), CFG_BOOL((char *) "sloppy_focus", cfg_true, CFGF_NONE), + CFG_BOOL((char *) "sloppy_focus_raise", cfg_true, CFGF_NONE), CFG_BOOL((char *) "new_become_master", cfg_true, CFGF_NONE), CFG_BOOL((char *) "new_get_focus", cfg_true, CFGF_NONE), CFG_STR((char *) "font", (char *) "mono-12", CFGF_NONE), diff --git a/layout.c b/layout.c index 5d3d21b8..10cc8f7b 100644 --- a/layout.c +++ b/layout.c @@ -143,7 +143,9 @@ restack(int screen) if(!sel) return; - XRaiseWindow(globalconf.display, sel->win); + if(!globalconf.screens[screen].sloppy_focus + || globalconf.screens[screen].sloppy_focus_raise) + XRaiseWindow(globalconf.display, sel->win); if(globalconf.screens[screen].focus_move_pointer) XWarpPointer(globalconf.display, None, sel->win, 0, 0, 0, 0, diff --git a/structs.h b/structs.h index 381966fc..a98dc19d 100644 --- a/structs.h +++ b/structs.h @@ -264,6 +264,8 @@ typedef struct Bool resize_hints; /** Sloppy focus: focus follow mouse */ Bool sloppy_focus; + /** True if we should raise windows on focus */ + Bool sloppy_focus_raise; /** Focus new clients */ Bool new_get_focus; /** True if new clients should become master */