Summary: | High CPU load when using desktop menu bar | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Mathieu Jobin <opensource> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | chatnick-spirou, sanchez_jesus_antonio |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Mathieu Jobin
2003-10-17 10:04:48 UTC
David said "blame new kwin". :-) *** Bug 67264 has been marked as a duplicate of this bug. *** *** Bug 67401 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of 65897 *** Does the solution require any patches from qt-copy? With setting "desktop menu bar" the menu bar stays blank while causing high CPU load. With setting "application bar" the application bar works fine, but stays blank (without high CPU load) when there should be the desktop bar (no window has focus). Addition: The blank bar doesn't go away when turned off. Please update and try again. I just recompile everything from CVS HEAD yesterday. and i'm using the MacOS menu bar right now. I've also try the other desktop menu bar, works fine. no excessive CPU load. but when i'm on the desktop, theer is nothing on the BAR. Turning off menu bar now works. The desktop menu bar stays blank in both modes where it displays here too. And application menu bar flickers and causes high CPU load. As previously, qt-copy without patches. The MacOS Bar was not eating excessif CPU until I shut it off. When I remove it, the bar did not dispear and kicker and kdesktop start taking the cpu load. until a load of 3.00 then I reenable the mac bar and my load is back to 0.30 Subject: kdelibs/kdeui CVS commit by lunakl: Try even harder to avoid infinite recursion. CCMAIL: 66152-done@bugs.kde.org M +10 -9 kmenubar.cpp 1.177 M +3 -3 kmenubar.h 1.61 --- kdelibs/kdeui/kmenubar.cpp #1.176:1.177 @@ -329,12 +329,13 @@ void KMenuBar::selectionTimeout() } -// KDE4 remove +int KMenuBar::block_resize = 0; + void KMenuBar::resizeEvent( QResizeEvent *e ) { - QMenuBar::resizeEvent(e); + ++block_resize; // do not respond with configure request to ConfigureNotify event + QMenuBar::resizeEvent(e); // to avoid possible infinite loop + --block_resize; } -bool KMenuBar::block_resize = false; - void KMenuBar::setGeometry( const QRect& r ) { @@ -344,7 +345,7 @@ void KMenuBar::setGeometry( const QRect& void KMenuBar::setGeometry( int x, int y, int w, int h ) { - if( block_resize ) + if( block_resize > 0 ) { - QMenuBar::setGeometry( x, y, width(), height()); + move( x, y ); return; } @@ -356,5 +357,5 @@ void KMenuBar::setGeometry( int x, int y void KMenuBar::resize( int w, int h ) { - if( block_resize ) + if( block_resize > 0 ) return; checkSize( w, h ); @@ -375,9 +376,9 @@ void KMenuBar::checkSize( int& w, int& h // sizeHint() may indirectly call resize(), avoid infinite // recursion. - block_resize = true; + ++block_resize; QSize s = sizeHint(); w = s.width(); h = s.height(); - block_resize = false; + ++block_resize; } // This is not done as setMinimumSize(), becase that would set the minimum --- kdelibs/kdeui/kmenubar.h #1.60:1.61 @@ -96,5 +96,5 @@ private: void setTopLevelMenuInternal(bool top_level); void checkSize( int& w, int& h ); - static bool block_resize; + static int block_resize; protected: virtual void virtual_hook( int id, void* data ); |