[Konsole-devel] [Bug 71213] transparent background is messed up on first invocation
Sandro Giessl
sandro at giessl.com
Thu May 20 16:44:07 UTC 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=71213
------- Additional Comments From sandro giessl com 2004-05-20 18:44 -------
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;
More information about the konsole-devel
mailing list