diff --git a/doc/manual/index.docbook b/doc/manual/index.docbook
index 9cc197505..e3fedd101 100644
--- a/doc/manual/index.docbook
+++ b/doc/manual/index.docbook
@@ -906,6 +906,12 @@ title: This is the title;; command: run me
+
+
+Disable transparent backgrounds, even if the system supports them.
+
+
+
Do not close the initial session automatically when it ends.
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 6d35fcd59..88b285095 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -58,6 +58,13 @@
using namespace Konsole;
+static bool useTransparency()
+{
+ const KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+ const bool compositingAvailable = KWindowSystem::compositingActive();
+ return compositingAvailable && args->isSet("transparency");
+}
+
MainWindow::MainWindow()
: KXmlGuiWindow()
, _bookmarkHandler(0)
@@ -65,10 +72,12 @@ MainWindow::MainWindow()
, _menuBarInitialVisibility(true)
, _menuBarInitialVisibilityApplied(false)
{
- // It is userful to have translucent terminal area
- setAttribute(Qt::WA_TranslucentBackground, true);
- // But it is mostly annoying to have translucent menubar and tabbar
- setAttribute(Qt::WA_NoSystemBackground, false);
+ if (useTransparency()) {
+ // It is userful to have translucent terminal area
+ setAttribute(Qt::WA_TranslucentBackground, true);
+ // But it is mostly annoying to have translucent menubar and tabbar
+ setAttribute(Qt::WA_NoSystemBackground, false);
+ }
// create actions for menus
setupActions();
diff --git a/src/main.cpp b/src/main.cpp
index a416d21ca..f1ad8de37 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -173,6 +173,9 @@ void fillCommandLineOptions(KCmdLineOptions& options)
options.add("hide-menubar", ki18n("Hide the menubar, overriding the default setting"));
options.add("show-tabbar", ki18n("Show the tabbar, overriding the default setting"));
options.add("hide-tabbar", ki18n("Hide the tabbar, overriding the default setting"));
+ options.add("notransparency",
+ ki18n("Disable transparent backgrounds, even if the system"
+ " supports them."));
options.add("list-profiles", ki18n("List the available profiles"));
options.add("list-profile-properties",
ki18n("List all the profile properties names and their type"