From 2ee38ca961a7d068fd8d5e0f2412ecc5cd8a1a43 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Fri, 8 Mar 2013 17:19:56 +0100 Subject: [PATCH] only FocusChangeMask|PropertyChangeMask if needed We don't need to listen to the corresponding events when we don't need to follow the mouse/keyboard focus. --- x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x.c b/x.c index f659b20..c7f1af4 100644 --- a/x.c +++ b/x.c @@ -805,8 +805,10 @@ void x_win_setup(void) (unsigned long)((100 - settings.transparency) * (0xffffffff / 100))); - long root_event_mask = FocusChangeMask | PropertyChangeMask; - XSelectInput(xctx.dpy, root, root_event_mask); + if (settings.f_mode != FOLLOW_NONE) { + long root_event_mask = FocusChangeMask | PropertyChangeMask; + XSelectInput(xctx.dpy, root, root_event_mask); + } } /*