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

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kicker/libkicker
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2006-02-28 1:26:46
Message-ID: 1141090006.972212.27203.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 514330 by aseigo:

fix for flicker caused by mouse overs at times
also fix a crash resulting from Insane Mouse Behaviour(tm)
BUG:117888


 M  +16 -2     kickertip.cpp  
 M  +1 -0      kickertip.h  


--- branches/KDE/3.5/kdebase/kicker/libkicker/kickertip.cpp #514329:514330
@@ -66,6 +66,7 @@
       m_mimeFactory(0),
       m_dissolveSize(0),
       m_dissolveDelta(-1),
+      m_direction(KPanelApplet::Up),
       m_dirty(false),
       m_toolTipsEnabled(KickerSettings::showToolTips()),
       m_tippingFor(0)
@@ -124,6 +125,7 @@
                                      data.subtext + "</p></qt>", font(), QString::null, 0,
                                      m_mimeFactory);
     m_richText->setWidth(400);
+    m_direction = data.direction;
 
     if (KickerSettings::mouseOversShowIcon())
     {
@@ -159,7 +161,7 @@
         m_timer.stop();
     }
 
-    move(KickerLib::popupPosition(data.direction, this, m_tippingFor));
+    move(KickerLib::popupPosition(m_direction, this, m_tippingFor));
     show();
 }
 
@@ -241,7 +243,11 @@
 
 void KickerTip::displayInternal()
 {
-    if (!m_richText)
+    // we need to check for m_tippingFor here as well as m_richText
+    // since if one is really persistant and moves the mouse around very fast
+    // you can trigger a situation where m_tippingFor gets reset to 0 but
+    // before display() is called!
+    if (!m_tippingFor || !m_richText)
     {
         return;
     }
@@ -267,6 +273,14 @@
         m_mask.resize(width, height);
         m_pixmap.resize(width, height);
         resize(width, height);
+        if (isVisible())
+        {
+            // we've already been shown before, but we may grow larger.
+            // in the case of Up or Right displaying tips, this growth can
+            // result in the tip occluding the panel and causing it to redraw
+            // once we return back to display() causing horrid flicker
+            move(KickerLib::popupPosition(m_direction, this, m_tippingFor));
+        }
     }
 
     // create and set transparency mask
--- branches/KDE/3.5/kdebase/kicker/libkicker/kickertip.h #514329:514330
@@ -103,6 +103,7 @@
 
     int m_dissolveSize;
     int m_dissolveDelta;
+    KPanelApplet::Direction m_direction;
 
     QTimer m_timer;
     QTimer m_frameTimer;
[prev in list] [next in list] [prev in thread] [next in thread] 

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