Summary: | Background of other sessions doesn't get updated correctly when maximizing. | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Sandro Giessl <sgiessl> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.3 Beta | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Sandro Giessl
2003-10-29 16:32:15 UTC
CVS commit by giessl: Fix #66843. This is a workaround for a possible bug in KRootPixmap. After resizing Konsole with multiple sessions and switching to another session, the tab widget sends resize events, but obviously KRootPixmap isn't able to handle them correctly. Please try if it also fixes #71213 and similar. CCMAIL: 66843-done@bugs.kde.org, 71213@bugs.kde.org, jansen@kde.org M +21 -0 konsole.cpp 1.461 M +1 -0 konsole.h 1.177 --- kdebase/konsole/konsole/konsole.cpp #1.460:1.461 @@ -881,4 +881,5 @@ void Konsole::makeTabWidget() { tabwidget = new KTabWidget(this); + tabwidget->installEventFilter(this); tabwidget->setTabReorderingEnabled(true); if (n_tabbar==TabTop) @@ -943,4 +944,19 @@ bool Konsole::eventFilter( QObject *o, Q } } + else if (o == tabwidget) + { + // There is probably a bug in KRootPixmap which makes this workaround + // neccesary: + // Mark the background of invisible TEWidgets dirty so they can be + // repainted when they are displayed next. + if (tabwidget && ev->type() == QEvent::Resize) { + for(int i = 0; i < tabwidget->count(); i++) { + QWidget *page = tabwidget->page(i); + if (page != tabwidget->currentPage()) { + rootxpmsDirty[page] = true; + } + } + } + } return KMainWindow::eventFilter(o, ev); } @@ -2426,4 +2442,9 @@ void Konsole::activateSession(QWidget* w activateSession(tabwidget->indexOf(w)); w->setFocus(); + if( rootxpmsDirty[w] ) { + // force repaint! + rootxpms[w]->repaint(true); + rootxpmsDirty.remove(w); + } } --- kdebase/konsole/konsole/konsole.h #1.176:1.177 @@ -285,4 +285,5 @@ private: QPtrDict<KRootPixmap> rootxpms; + QMap<QWidget*, bool> rootxpmsDirty; KWinModule* kWinModule; |