X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Feventdispatcher.cc;h=c80f3857a41a77ab7fd9ccb5f5571d2d894def74;hb=2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d;hp=73c329e8d27df340fb76e37b96ec775da33950ea;hpb=2ae2b257d39ea62640c2590f794e4275c6db1cd4;p=chaz%2Fopenbox diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc index 73c329e8..c80f3857 100644 --- a/otk/eventdispatcher.cc +++ b/otk/eventdispatcher.cc @@ -78,8 +78,10 @@ void OtkEventDispatcher::dispatchEvents(void) // any other types are not ones we're interested in if (e.xfocus.detail == NotifyNonlinear) { if (e.xfocus.window != focus) { - unfocus = focus; + if (focus) + unfocus = focus; focus = e.xfocus.window; + printf("FocusIn focus=%lx unfocus=%lx\n", focus, unfocus); } } } else if (e.type == FocusOut) { @@ -88,6 +90,7 @@ void OtkEventDispatcher::dispatchEvents(void) if (e.xfocus.window == focus) { unfocus = focus; focus = None; + printf("FocusIn focus=%lx unfocus=%lx\n", focus, unfocus); } } } else { @@ -123,8 +126,8 @@ void OtkEventDispatcher::dispatch(const XEvent &e) { if (handler) handler->handle(e); - if (master) - master->handle(e); + if (_master) + _master->handle(e); } OtkEventHandler *OtkEventDispatcher::findHandler(Window win)