From 4bec1c366d8579273ec8a24fe5853ce73812ca1a Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sat, 8 Jul 2000 11:57:38 +0000 Subject: [PATCH] improved focus follows mouse support with Alt-Tab svn path=/trunk/kdebase/kwin/; revision=55750 --- tabbox.cpp | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/tabbox.cpp b/tabbox.cpp index 427b0ae30c..d231cb60c0 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -273,27 +273,33 @@ void TabBox::paintContents() } } - void -TabBox::hide() +void TabBox::hide() { - delayedShowTimer.stop(); - QWidget::hide(); + delayedShowTimer.stop(); + QWidget::hide(); + QApplication::syncX(); + XEvent otherEvent; + while (XCheckTypedEvent (qt_xdisplay(), EnterNotify, &otherEvent ) ) + ; } - void -TabBox::delayedShow() + +/*! + Rikkus: please document! (Matthias) + */ +void TabBox::delayedShow() { - KConfig * c(KGlobal::config()); - c->setGroup("TabBox"); - bool delay = c->readNumEntry("ShowDelay", false); + KConfig * c(KGlobal::config()); + c->setGroup("TabBox"); + bool delay = c->readNumEntry("ShowDelay", false); + + if (!delay) { + show(); + return; + } - if (!delay) { - show(); - return; - } - - int delayTime = c->readNumEntry("DelayTime", 400); - delayedShowTimer.start(delayTime, true); + int delayTime = c->readNumEntry("DelayTime", 400); + delayedShowTimer.start(delayTime, true); } #include "tabbox.moc"