summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--konsole/konsole/konsole.cpp12
-rw-r--r--konsole/konsole/konsole_part.cpp32
-rw-r--r--konsole/konsole/main.cpp2
3 files changed, 32 insertions, 14 deletions
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index 973e17abe..2af5da9ea 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -1634,9 +1634,15 @@ void Konsole::readProperties(KConfig* config, const TQString &schema, bool globa
if (te) {
if (sch->useTransparency())
{
- if (!rootxpms[te])
- rootxpms.insert( te, new KRootPixmap(te) );
- rootxpms[te]->setFadeEffect(sch->tr_x(), TQColor(sch->tr_r(), sch->tr_g(), sch->tr_b()));
+ if (!argb_visual) {
+ if (!rootxpms[te])
+ rootxpms.insert( te, new KRootPixmap(te) );
+ rootxpms[te]->setFadeEffect(sch->tr_x(), TQColor(sch->tr_r(), sch->tr_g(), sch->tr_b()));
+ }
+ 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
{
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) {
diff --git a/konsole/konsole/main.cpp b/konsole/konsole/main.cpp
index 1d0fdbb48..1f40e8c14 100644
--- a/konsole/konsole/main.cpp
+++ b/konsole/konsole/main.cpp
@@ -252,7 +252,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
a = new KApplication(KApplication::openX11RGBADisplay());
argb_visual = a->isX11CompositionAvailable();
#else
- KApplication* a = new KApplication;
+ a = new KApplication;
#endif
TQString dataPathBase = KStandardDirs::kde_default("data").append("konsole/");