summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-25 21:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-25 21:30:31 +0000
commit5e9ef0f08644b18efe82cbae031b8c1fef6fef5f (patch)
treeb0f500382a3cf6dd0364f8540835776692e4011c /kicker
parentaf3b8b850ecf92c4689c33aeef68d273176175e3 (diff)
downloadtdebase-5e9ef0f08644b18efe82cbae031b8c1fef6fef5f.tar.gz
tdebase-5e9ef0f08644b18efe82cbae031b8c1fef6fef5f.zip
Fixed logout UI glitch
Improved appearance of KDM O2 Enterprise theme git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1179564 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker')
-rw-r--r--kicker/kicker/ui/k_mnu.cpp34
-rw-r--r--kicker/kicker/ui/k_mnu.h3
2 files changed, 37 insertions, 0 deletions
diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp
index 9328a8586..0506201f5 100644
--- a/kicker/kicker/ui/k_mnu.cpp
+++ b/kicker/kicker/ui/k_mnu.cpp
@@ -33,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqstyle.h>
#include <tqtimer.h>
#include <tqtooltip.h>
+#include <tqeventloop.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -115,6 +116,39 @@ void PanelKMenu::slotServiceStartedByStorageId(TQString starter,
}
}
+void PanelKMenu::hideMenu()
+{
+ hide();
+
+ // Try to redraw the area under the menu
+ // Qt makes this surprisingly difficult to do in a timely fashion!
+ while (isShown() == true)
+ kapp->eventLoop()->processEvents(1000);
+ TQTimer *windowtimer = new TQTimer( this );
+ connect( windowtimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) );
+ windowTimerTimedOut = false;
+ windowtimer->start( 0, TRUE ); // Wait for all window system events to be processed
+ while (windowTimerTimedOut == false)
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000);
+
+ // HACK
+ // The K Menu takes an unknown amount of time to disappear, and redrawing
+ // the underlying window(s) also takes time. This should allow both of those
+ // events to occur (unless you're on a 200MHz Pentium 1 or similar ;-))
+ // thereby removing a bad shutdown screen artifact while still providing
+ // a somewhat snappy user interface.
+ TQTimer *delaytimer = new TQTimer( this );
+ connect( delaytimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) );
+ windowTimerTimedOut = false;
+ delaytimer->start( 100, TRUE ); // Wait for 100 milliseconds
+ while (windowTimerTimedOut == false)
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000);
+}
+
+void PanelKMenu::windowClearTimeout()
+{
+ windowTimerTimedOut = true;
+}
bool PanelKMenu::loadSidePixmap()
{
diff --git a/kicker/kicker/ui/k_mnu.h b/kicker/kicker/ui/k_mnu.h
index 6dedec4c9..16655bdd6 100644
--- a/kicker/kicker/ui/k_mnu.h
+++ b/kicker/kicker/ui/k_mnu.h
@@ -50,6 +50,7 @@ class PanelKMenu : public PanelServiceMenu, public DCOPObject
k_dcop:
void slotServiceStartedByStorageId(TQString starter, TQString desktopPath);
+ void hideMenu();
public:
PanelKMenu();
@@ -86,6 +87,7 @@ protected slots:
virtual void configChanged();
void updateRecent();
void repairDisplay();
+ void windowClearTimeout();
protected:
TQRect sideImageRect();
@@ -117,6 +119,7 @@ private:
static const int searchLineID;
TQTimer *displayRepairTimer;
bool displayRepaired;
+ bool windowTimerTimedOut;
};
#endif