summaryrefslogtreecommitdiffstats
path: root/konsole/konsole/konsole_part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-14 19:58:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-14 19:58:08 +0000
commit082f536b5bfcf71bec5e04b940328de7894f4513 (patch)
treece30da96cc4755c2d8876d5d2ceed2aeefc9e23b /konsole/konsole/konsole_part.cpp
parent168f63d2ca18b82fa2921377dcea03701ad6bdbc (diff)
downloadtdebase-082f536b5bfcf71bec5e04b940328de7894f4513.tar.gz
tdebase-082f536b5bfcf71bec5e04b940328de7894f4513.zip
Fix konsole startup on session resume when ARGB visuals are enabled
Fix konsole FTBFS if COMPOSITE extension is not available git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1258919 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konsole/konsole/konsole_part.cpp')
-rw-r--r--konsole/konsole/konsole_part.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp
index 1887d7373..b5463f8fb 100644
--- a/konsole/konsole/konsole_part.cpp
+++ b/konsole/konsole/konsole_part.cpp
@@ -586,11 +586,17 @@ void konsolePart::readProperties()
te->setColorTable(sch->table()); //FIXME: set twice here to work around a bug
if (sch->useTransparency()) {
- if (!rootxpm)
- rootxpm = new KRootPixmap(TQT_TQWIDGET(te));
- rootxpm->setFadeEffect(sch->tr_x(), TQColor(sch->tr_r(), sch->tr_g(), sch->tr_b()));
- rootxpm->start();
- rootxpm->tqrepaint(true);
+ if (!argb_visual) {
+ if (!rootxpm)
+ rootxpm = new KRootPixmap(TQT_TQWIDGET(te));
+ rootxpm->setFadeEffect(sch->tr_x(), TQColor(sch->tr_r(), sch->tr_g(), sch->tr_b()));
+ rootxpm->start();
+ rootxpm->tqrepaint(true);
+ }
+ else {
+ te->setBlendColor(tqRgba(sch->tr_r(), sch->tr_g(), sch->tr_b(), int(sch->tr_x() * 255)));
+ te->setErasePixmap( TQPixmap() ); // make sure any background pixmap is unset
+ }
}
else {
if (rootxpm) {
@@ -774,11 +780,17 @@ void konsolePart::setSchema(ColorSchema* s)
te->setColorTable(s->table()); //FIXME: set twice here to work around a bug
if (s->useTransparency()) {
- if (!rootxpm)
- rootxpm = new KRootPixmap(TQT_TQWIDGET(te));
- rootxpm->setFadeEffect(s->tr_x(), TQColor(s->tr_r(), s->tr_g(), s->tr_b()));
- rootxpm->start();
- rootxpm->tqrepaint(true);
+ if (!argb_visual) {
+ if (!rootxpm)
+ rootxpm = new KRootPixmap(TQT_TQWIDGET(te));
+ rootxpm->setFadeEffect(s->tr_x(), TQColor(s->tr_r(), s->tr_g(), s->tr_b()));
+ rootxpm->start();
+ rootxpm->tqrepaint(true);
+ }
+ else {
+ te->setBlendColor(tqRgba(s->tr_r(), s->tr_g(), s->tr_b(), int(s->tr_x() * 255)));
+ te->setErasePixmap( TQPixmap() ); // make sure any background pixmap is unset
+ }
}
else {
if (rootxpm) {