summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-04-17 18:02:16 +0300
committerMavridis Philippe <mavridisf@gmail.com>2022-04-19 18:33:22 +0300
commit9e5de2954c908a2672b9bf2bc58838c74cf33ded (patch)
tree7653c3fd415f99f1b9fb8cd14f0f57478e1073fb
parent28ccd3d7f23f330e40c3f5a4768e8955aada4635 (diff)
downloadtdebase-9e5de2954c908a2672b9bf2bc58838c74cf33ded.tar.gz
tdebase-9e5de2954c908a2672b9bf2bc58838c74cf33ded.zip
Konsole: real transparency switch
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit ee161dcf9e675d5103c2f43dec492f4e7190aca8)
-rw-r--r--kcontrol/konsole/kcmkonsole.cpp11
-rw-r--r--kcontrol/konsole/kcmkonsole.h1
-rw-r--r--kcontrol/konsole/kcmkonsoledialog.ui22
-rw-r--r--konsole/konsole/konsole.cpp20
-rw-r--r--konsole/konsole/konsole.h1
5 files changed, 43 insertions, 12 deletions
diff --git a/kcontrol/konsole/kcmkonsole.cpp b/kcontrol/konsole/kcmkonsole.cpp
index ace7409a7..7dfb77dae 100644
--- a/kcontrol/konsole/kcmkonsole.cpp
+++ b/kcontrol/konsole/kcmkonsole.cpp
@@ -74,6 +74,7 @@ KCMKonsole::KCMKonsole(TQWidget * parent, const char *name, const TQStringList&)
connect(dialog->tabsCycleWheelCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
connect(dialog->menuAcceleratorsCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
connect(dialog->metaAsAltModeCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->realTransparency,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
connect(dialog->silence_secondsSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
connect(dialog->word_connectorLE,TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT( changed() ));
connect(dialog->SchemaEditor1, TQT_SIGNAL(changed()), TQT_SLOT( changed() ));
@@ -112,6 +113,8 @@ void KCMKonsole::load(bool useDefaults)
dialog->silence_secondsSB->setValue(config.readUnsignedNumEntry( "SilenceSeconds", 10 ));
dialog->word_connectorLE->setText(config.readEntry("wordseps",":@-./_~"));
dialog->metaAsAltModeCB->setChecked(config.readBoolEntry("metaAsAltMode",false));
+ realTransparencyOrig = config.readBoolEntry("RealTransparency",false);
+ dialog->realTransparency->setChecked(realTransparencyOrig);
dialog->SchemaEditor1->setSchema(config.readEntry("schema"));
@@ -153,6 +156,8 @@ void KCMKonsole::save()
config.writeEntry("SilenceSeconds" , dialog->silence_secondsSB->value());
config.writeEntry("wordseps", dialog->word_connectorLE->text());
config.writeEntry("metaAsAltMode", dialog->metaAsAltModeCB->isChecked());
+ bool realTransparencyNew = dialog->realTransparency->isChecked();
+ config.writeEntry("RealTransparency", realTransparencyNew);
config.writeEntry("schema", dialog->SchemaEditor1->schema());
@@ -174,6 +179,12 @@ void KCMKonsole::save()
"settings of existing Konsole sessions."));
}
+ if (realTransparencyOrig != realTransparencyNew)
+ {
+ KMessageBox::information(this, i18n("The real transparency setting will only affect "
+ "newly started Konsole sessions.\n"));
+ }
+
if (bidiNew && !bidiOrig)
{
KMessageBox::information(this, i18n("You have chosen to enable "
diff --git a/kcontrol/konsole/kcmkonsole.h b/kcontrol/konsole/kcmkonsole.h
index 561cb4502..abdd4cc76 100644
--- a/kcontrol/konsole/kcmkonsole.h
+++ b/kcontrol/konsole/kcmkonsole.h
@@ -40,6 +40,7 @@ public:
private:
KCMKonsoleDialog *dialog;
bool xonXoffOrig;
+ bool realTransparencyOrig;
bool bidiOrig;
};
diff --git a/kcontrol/konsole/kcmkonsoledialog.ui b/kcontrol/konsole/kcmkonsoledialog.ui
index fea9ad139..a94a1b48b 100644
--- a/kcontrol/konsole/kcmkonsoledialog.ui
+++ b/kcontrol/konsole/kcmkonsoledialog.ui
@@ -174,7 +174,15 @@
<string>Handle Meta &amp;key as Alt Key</string>
</property>
</widget>
- <widget class="TQLabel" row="13" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="13" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>realTransparency</cstring>
+ </property>
+ <property name="text">
+ <string>Use &amp;real transparency</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="14" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>TextLabel1_4</cstring>
</property>
@@ -193,7 +201,7 @@
<cstring>line_spacingSB</cstring>
</property>
</widget>
- <spacer row="12" column="3">
+ <spacer row="13" column="3">
<property name="name">
<cstring>Spacer3</cstring>
</property>
@@ -210,7 +218,7 @@
</size>
</property>
</spacer>
- <widget class="KIntNumInput" row="13" column="2">
+ <widget class="KIntNumInput" row="14" column="2">
<property name="name">
<cstring>line_spacingSB</cstring>
</property>
@@ -246,7 +254,7 @@
</size>
</property>
</spacer>
- <widget class="TQLabel" row="14" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="15" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>SilenceLabel</cstring>
</property>
@@ -265,7 +273,7 @@
<cstring>silence_secondsSB</cstring>
</property>
</widget>
- <widget class="KIntNumInput" row="14" column="2">
+ <widget class="KIntNumInput" row="15" column="2">
<property name="name">
<cstring>silence_secondsSB</cstring>
</property>
@@ -284,7 +292,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="TQLabel" row="15" column="0" colspan="3">
+ <widget class="TQLabel" row="16" column="0" colspan="3">
<property name="name">
<cstring>TextLabel1_3</cstring>
</property>
@@ -295,7 +303,7 @@
<cstring>word_connectorLE</cstring>
</property>
</widget>
- <widget class="TQLineEdit" row="16" column="0" colspan="3">
+ <widget class="TQLineEdit" row="17" column="0" colspan="3">
<property name="name">
<cstring>word_connectorLE</cstring>
</property>
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index b6d5e1c69..4faef5239 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -266,6 +266,7 @@ Konsole::Konsole(const char* name, int histon, bool menubaron, bool tabbaron, bo
,b_installBitmapFonts(false)
,b_framevis(true)
,b_metaAsAlt(false)
+,b_realTransparency(false)
,b_fullscreen(false)
,m_menuCreated(false)
,b_warnQuit(false)
@@ -361,11 +362,6 @@ Konsole::Konsole(const char* name, int histon, bool menubaron, bool tabbaron, bo
// connect(kapp, TQT_SIGNAL(tdedisplayFontChanged()), this, TQT_SLOT(slotFontChanged()));
kapp->dcopClient()->setDefaultObject( "konsole" );
-
- // Signal that we want to be transparent to the desktop, not to windows behind us...
- Atom kde_wm_transparent_to_desktop;
- kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False);
- XChangeProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
}
@@ -1616,6 +1612,20 @@ void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool glo
s_word_seps= config->readEntry("wordseps",":@-./_~");
b_framevis = config->readBoolEntry("has frame",true);
b_metaAsAlt = config->readBoolEntry("metaAsAltMode",false);
+ b_realTransparency = config->readBoolEntry("RealTransparency",false);
+
+ Atom kde_wm_transparent_to_desktop;
+ kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_TDE_TRANSPARENT_TO_DESKTOP", False);
+ if (b_realTransparency)
+ {
+ XDeleteProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop);
+ }
+ else
+ {
+ // Signal that we want to be transparent to the desktop, not to windows behind us...
+ XChangeProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ }
+
TQPtrList<TEWidget> tes = activeTEs();
for (TEWidget *_te = tes.first(); _te; _te = tes.next()) {
_te->setWordCharacters(s_word_seps);
diff --git a/konsole/konsole/konsole.h b/konsole/konsole/konsole.h
index 30ca6e5a1..fff364eb7 100644
--- a/konsole/konsole/konsole.h
+++ b/konsole/konsole/konsole.h
@@ -428,6 +428,7 @@ private:
bool b_framevis:1;
bool b_metaAsAlt:1;
+ bool b_realTransparency:1;
bool b_fullscreen:1;
bool m_menuCreated:1;
bool b_warnQuit:1;