X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fblackbox.cc;h=ce727aff42354a5c62b2916513b9589bf37c992a;hb=4e0fde35ac60dcf36c3180b1606abba84ccace34;hp=c93b28a6331683a727333f07ac746234483e31a1;hpb=b8ee3dbc4565efb19338c5cf1948f0f4e2f24fd6;p=chaz%2Fopenbox diff --git a/src/blackbox.cc b/src/blackbox.cc index c93b28a6..ce727aff 100644 --- a/src/blackbox.cc +++ b/src/blackbox.cc @@ -559,11 +559,14 @@ void Blackbox::process_event(XEvent *e) { } 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; } @@ -650,7 +653,7 @@ void Blackbox::process_event(XEvent *e) { 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;