#endif // HAVE_LIBGEN_H
}
+#include <assert.h>
+
#include <algorithm>
#include <string>
using std::string;
}
case FocusIn: {
- if (e->xfocus.detail != NotifyNonlinear) {
+ if (e->xfocus.detail != NotifyNonlinear &&
+ e->xfocus.detail != NotifyAncestor) {
/*
don't process FocusIns when:
1. the new focus window isn't an ancestor or inferior of the old
focus window (NotifyNonlinear)
+ make sure to allow the FocusIn when the old focus window was an
+ ancestor but didn't have a parent, such as root (NotifyAncestor)
*/
break;
}
case ClientMessage: {
if (e->xclient.format == 32) {
- if (e->xclient.message_type == getWMChangeStateAtom()) {
+ if (e->xclient.message_type == xatom->getAtom(XAtom::wm_change_state)) {
BlackboxWindow *win = searchWindow(e->xclient.window);
if (! win || ! win->validateClient()) return;