From a70f507b67d0acc87d1e9cb7c7ab320620ea0ea6 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 26 Aug 2012 09:13:16 -0400 Subject: [PATCH] Restore --notransparency option for NVIDIA users Some NVIDIA users still require this option for Konsole to work as expected This reverts 66b4a96e9353525703db77b189771a454f38f03d Thanks to Matthias Kretz kretz@kde.org for patch/info. BUG: 305307 FIXED-IN: 4.10 --- doc/manual/index.docbook | 6 ++++++ src/MainWindow.cpp | 17 +++++++++++++---- src/main.cpp | 3 +++ 3 files changed, 22 insertions(+), 4 deletions(-) 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"