From 60d5462c3fcd92cb6bc799a7ba5335f0a2d19741 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 10 Mar 2010 14:20:20 +0000 Subject: [PATCH] don't hide the popup if it lost focus but ithe icon is pressed. not too pretty solution to BUG:230157 svn path=/trunk/KDE/kdelibs/; revision=1101663 --- popupapplet.cpp | 4 +++- widgets/iconwidget.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/popupapplet.cpp b/popupapplet.cpp index 016642a43..7f1bf9d54 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -435,7 +435,6 @@ bool PopupApplet::eventFilter(QObject *watched, QEvent *event) { if (!d->passive && watched == d->dialogPtr.data() && (event->type() == QEvent::WindowDeactivate)) { d->popupLostFocus = true; - hidePopup(); QTimer::singleShot(100, this, SLOT(clearPopupLostFocus())); } @@ -660,6 +659,9 @@ void PopupAppletPrivate::hideTimedPopup() void PopupAppletPrivate::clearPopupLostFocus() { + if (!icon || !icon->isDown()) { + q->hidePopup(); + } popupLostFocus = false; } diff --git a/widgets/iconwidget.h b/widgets/iconwidget.h index 5632b863c..e0b2a2d95 100644 --- a/widgets/iconwidget.h +++ b/widgets/iconwidget.h @@ -353,6 +353,7 @@ private: IconWidgetPrivate * const d; friend class IconWidgetPrivate; + friend class PopupAppletPrivate; }; } // namespace Plasma