aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-14 15:53:07 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-01-14 15:53:07 +0200
commit9fdf750750c7ee6f6e9e44cd359ce6a1aae53227 (patch)
tree153ba038238f874bfc6d3794d8c6cf6661cc91a4
parentbbcb0f869ed76b2ffaf3e28d0c82399aae2d14a8 (diff)
if CLICK_TO_FOCUS is set, grab button1
-rw-r--r--monsterwm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/monsterwm.c b/monsterwm.c
index c04714b..f4b8091 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -217,6 +217,7 @@ void addwindow(Window w) {
prevfocus = current;
XSelectInput(dis, ((current = c)->win = w), PropertyChangeMask|(FOLLOW_MOUSE?EnterWindowMask:0));
+ if (CLICK_TO_FOCUS) XGrabButton(dis, Button1, None, w, True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
}
/* on the press of a button check to see if there's a binded function to call */