config.h FOCUS_START

This commit is contained in:
seanpringle
2012-09-11 10:41:06 +10:00
parent 10d65ec43d
commit 1ff72ed2bd
3 changed files with 12 additions and 1 deletions

View File

@@ -51,6 +51,12 @@
// If on multi-head, place windows on monitor holding current window.
#define MONITOR_START MONITOR_CURRENT
// Should new windows be automatically focused, or ignored until focused manually?
// IGNORE means new windows only steal focus if they obscure the current window.
// STEAL means new windows always steal focus.
#define FOCUS_START FOCUS_IGNORE
//#define FOCUS_START FOCUS_STEAL
// If you use "AnyModifier" place those keys at the end of the array.
binding keys[] = {

2
xoat.c
View File

@@ -697,7 +697,7 @@ void map_notify(XEvent *e)
client_raise_family(c);
client_update_border(c);
// if no current window, or new window has opened in the current spot, focus it
if (!(a = window_build_client(current)) || (a && a->spot == c->spot))
if (FOCUS_START == FOCUS_STEAL || !(a = window_build_client(current)) || (a && a->spot == c->spot))
client_set_focus(c);
client_free(a);
ewmh_client_list();

5
xoat.h
View File

@@ -70,6 +70,11 @@ enum {
SPOT1_RIGHT
};
enum {
FOCUS_IGNORE=1,
FOCUS_STEAL,
};
typedef struct {
short x, y, w, h;
} box;