Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 121

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.1.3/kicker/core/kicker.cpp--	2003-08-26 11:31:57.000000000 +0200
+++ kdebase-3.1.3/kicker/core/kicker.cpp	2003-08-26 11:33:04.000000000 +0200
@@ -119,19 +119,12 @@ Kicker::~Kicker()
 
 void Kicker::slotKMenuAccel()
 {
-	if( !kMenu->isVisible() ) {
-		// Popup the K-menu at the center of the screen.
-		QDesktopWidget* desktop = KApplication::desktop();
-		QRect r = desktop->screenGeometry(
-				desktop->screenNumber(QCursor::pos()));
-		kMenu->popup(r.center() - kMenu->rect().center());
-
-		// when the cursor is in the area where the menu pops up,
-		// the item under the cursor gets selected. The single shot 
-		// avoids this from happening by allowing the item to be selected
-		// when the event loop is enterred, and then resetting it.
-		QTimer::singleShot(0, this, SLOT(slotSetKMenuItemActive()));
-	}
+    if( kMenu->isVisible() ) {
+        kMenu->hide();
+    } else {
+        kMenu->popup( QCursor::pos() );
+        kMenu->setActiveItem(0);
+    }
 }
 
 void Kicker::slotSetKMenuItemActive()