diff --git a/src/client.c b/src/client.c index cd2225d..da23556 100644 --- a/src/client.c +++ b/src/client.c @@ -96,7 +96,7 @@ client_get_next(void) return NULL; for(c = sel->next; c && ishide(c, selscreen); c = c->next); - if(!c) + if(!c && conf.client_round) for(c = clients; c && ishide(c, selscreen); c = c->next); return c; @@ -117,7 +117,7 @@ client_get_prev(void) if(!ishide(d, selscreen)) c = d; - if(!c) + if(!c && conf.client_round) for(; d; d = d->next) if(!ishide(d, selscreen)) c = d; @@ -242,7 +242,7 @@ client_focus(Client *c) sel->flags &= ~AboveFlag; frame_update(sel); - mouse_grabbuttons(sel, False); + mouse_grabbuttons(sel, !conf.focus_pclick); } if((sel = c)) diff --git a/src/config.c b/src/config.c index d303fd3..94cfab1 100644 --- a/src/config.c +++ b/src/config.c @@ -148,6 +148,7 @@ conf_misc_section(char *src) conf.raisefocus = get_opt(src, "false", "raisefocus").bool; conf.raiseswitch = get_opt(src, "false", "raiseswitch").bool; conf.focus_fmouse = get_opt(src, "true", "focus_follow_mouse").bool; + conf.focus_pclick = get_opt(src, "true", "focus_pointer_click").bool; conf.status_timing = get_opt(src, "1", "status_timing").num; conf.status_path = get_opt(src, "", "status_path").str; conf.autostart_path = get_opt(src, "", "autostart_path").str; @@ -218,6 +219,7 @@ conf_client_section(char *src) /* Client misc */ cfg_set_sauv(src); + conf.client_round = get_opt(src, "true", "client_round").bool; conf.client.borderheight = (get_opt(src, "1", "border_height").num < 1 ? 1 : get_opt(src, "1", "border_height").num); conf.client.border_shadow = get_opt(src, "false", "border_shadow").bool; conf.client.place_at_mouse = get_opt(src, "false", "place_at_mouse").bool; diff --git a/src/structs.h b/src/structs.h index 93cec8b..50ebdcc 100644 --- a/src/structs.h +++ b/src/structs.h @@ -341,6 +341,7 @@ typedef struct Bool raisefocus; Bool raiseswitch; Bool focus_fmouse; + Bool focus_pclick; Bool ignore_next_client_rules; uint pad; int status_timing; @@ -419,6 +420,7 @@ typedef struct Launcher *launcher; int *ntag; Bool tag_round; + Bool client_round; Bool layout_system; /* Switch: False, Menu: True. */ Bool layout_placement; /* Right (normal): False, Left: True. */ /* Number of... */ diff --git a/wmfsrc.in b/wmfsrc.in index b18fd93..aa9b454 100644 --- a/wmfsrc.in +++ b/wmfsrc.in @@ -7,6 +7,10 @@ font = "dejavu-10" raisefocus = false focus_follow_mouse = true + # focus_pointer_click: click on unfocused client area: + # true -- default, set focus + # false -- click go to client; including dockapps + focus_pointer_click = true status_timing = 1 #seconds [/misc] @@ -95,6 +99,7 @@ [/root] [client] + client_round = true border_height = 3 border_shadow = true border_normal = "#191919"