tpfw: handle case when no window is focused - wmutils - X windows manipulation utilities
HTML git clone git://z3bra.org/wmutils
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 433c96cb533ccd85b0c6baa553e3d240104802d1
DIR parent 2fd44f648b4eb8b2a2f5ee6ee742abe9da85ebc2
HTML Author: Igor Zavorotkin <ivzave@gmail.com>
Date: Tue, 14 Jun 2016 01:14:52 +0300
pfw: handle case when no window is focused
Diffstat:
M pfw.c | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
DIR diff --git a/pfw.c b/pfw.c
t@@ -25,6 +25,10 @@ focus_window(void)
w = r->focus;
free(r);
+
+ if (w == XCB_NONE || w == XCB_INPUT_FOCUS_POINTER_ROOT)
+ errx(1, "focus not set");
+
return w;
}