[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [PATCH] Don't show tooltips after a click
From:       Jason Stubbs <jasonbstubbs () gmail ! com>
Date:       2008-07-25 14:36:27
Message-ID: 200807252336.27866.jasonbstubbs () gmail ! com
[Download RAW message or body]

Hey,

Just a quickie so going direct to the ML.

Basically, having a tooltip pop up after moving the mouse into the tasks and 
clicking a task to switch to it is really bugging me. This patch fixes it 
(and cleans up a little whitespace too). Okay to commit?

-- 
Jason Stubbs

["hide-tooltip-until-reentry.patch" (text/x-diff)]

Index: workspace/libs/plasma/tooltipmanager.cpp
===================================================================
--- workspace/libs/plasma/tooltipmanager.cpp	(revision 837691)
+++ workspace/libs/plasma/tooltipmanager.cpp	(working copy)
@@ -308,8 +308,8 @@
 bool ToolTipManager::eventFilter(QObject *watched, QEvent *event)
 {
     QGraphicsWidget * widget = dynamic_cast<QGraphicsWidget *>(watched);
-    if (!widget) { 
-      return QObject::eventFilter(watched,event);
+    if (!widget) {
+        return QObject::eventFilter(watched, event);
     }
 
     switch (event->type()) {
@@ -320,6 +320,13 @@
                 break;
             }
 
+            // Don't restart the show timer on a mouse move event if there hasn't
+            // an enter event or the current widget has been cleared by a click or
+            // wheel event.
+            if (!d->currentWidget) {
+                break;
+            }
+
         case QEvent::GraphicsSceneHoverEnter:
         {
             // Check that there is a tooltip to show


_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic