From 2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 26 Dec 2002 17:22:53 +0000 Subject: support the button pressed resources better --- otk/eventdispatcher.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'otk/eventdispatcher.cc') diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc index 4a70c857..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 { -- cgit v1.2.3