FreeCAD causes a 100% cpu load in conjunction with Oxygen. Confirmed in irc channel. See additional information for test case and this link: https://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=4&t=2815 Reproducible: Always [quote="wmayer"]Here is a test application that shows that it's clearly not a FreeCAD bug but KDE/oxygen issue: main.cpp [code] /** * This test application demonstrates a bug with KDE that happens if all of these points are fulfilled: * 1. Using KDE desktop environment * 2. Using Oxygen windows style * 3. Enabling the tab bar of QMdiArea * 4. Maximaize the main window after start */ #include <QtCore> #include <QtGui> #include <QtWebKit> class GUIApplication : public QApplication { public: GUIApplication(int & argc, char ** argv) : QApplication(argc, argv) { } bool notify (QObject * receiver, QEvent * event) { int type = event->type(); if (type != 113 && type != 1) printf("Event type %d\n", type); return QApplication::notify(receiver, event); } }; int main(int argc, char** argv) { GUIApplication app(argc, argv); QMainWindow mw; mw.show(); QMdiArea* mdiArea = new QMdiArea(); mdiArea->setTabPosition(QTabWidget::South); // Having the tabbar enabled casuses a full CPU load later when resizing mdiArea->setViewMode(QMdiArea::TabbedView); mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation, false); mdiArea->setActivationOrder(QMdiArea::ActivationHistoryOrder); mw.setCentralWidget(mdiArea); QMainWindow* view = new QMainWindow(&mw); QWebView* web = new QWebView(view); view->setCentralWidget(web); web->load(QUrl("http://www.heise.de")); QMdiSubWindow* child = new QMdiSubWindow(mdiArea->viewport()); child->setAttribute(Qt::WA_DeleteOnClose); child->setWidget(view); mdiArea->addSubWindow(child); view->showMaximized(); return app.exec(); } [/code] test.pro [code] TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . QT += webkit # Input SOURCES += main.cpp [/code][/quote]
Interestingly, it also happens with Skulpture style, but not with Plastique. Since the test involves QMdiSubWindow, I guess it is caused by the MDI shadows, which Skulpture and Oxygen uses.
That was tricky. QMdiArea is a scroll area. Qt will resize a maximized window automatically, when the scroll area changes in size. When the scroll bars are set to "as needed", then the viewport can get smaller, if there is a window outside the current viewport. Skulpture tried to clip shadows, so that the shadows won't got outside the bounds of the area. But it did clip to the complete area, insted of the viewport. This caused an infinite "scroll bar on / off" loop. Hugo, I will commit a fix to Skulpture 0.2 branch soon, and CC here, so that you can "side port" the fix to Oxygen.
Meh, git doesn't send to bko for scratch projects ... anyway, see commit at http://quickgit.kde.org/index.php?p=scratch%2Fcfeck%2Fskulpture.git&a=commit&h=4e36baf0032c9f2e1c78cf11175e726d9582778a
https://git.reviewboard.kde.org/r/106240/
@Christoph Thanks for tracking this down and fixing. Working on side-porting it right now. Hugo (back from vacation :))
Git commit 79ae754d1f22a788e7a8c3b1e267ce137f35bf23 by Hugo Pereira Da Costa. Committed on 27/08/2012 at 23:11. Pushed by hpereiradacosta into branch 'master'. Fix endless recursion with MDI shadows Thanks Christoph Feck ! REVIEW: 106240 M +3 -1 kstyles/oxygen/oxygenmdiwindowshadow.cpp http://commits.kde.org/kde-workspace/79ae754d1f22a788e7a8c3b1e267ce137f35bf23
Git commit bc15060f6aa1cf3a699202918e94cc08b01f9fa8 by Hugo Pereira Da Costa. Committed on 27/08/2012 at 23:11. Pushed by hpereiradacosta into branch 'KDE/4.9'. Fix endless recursion with MDI shadows Thanks Christoph Feck ! REVIEW: 106240 M +3 -1 kstyles/oxygen/oxygenmdiwindowshadow.cpp http://commits.kde.org/kde-workspace/bc15060f6aa1cf3a699202918e94cc08b01f9fa8
... closing.