Restore --notransparency option for NVIDIA users

Some NVIDIA users still require this option for Konsole to work as
expected

This reverts 66b4a96e93

Thanks to Matthias Kretz kretz@kde.org for patch/info.
BUG: 305307
FIXED-IN: 4.10
This commit is contained in:
Kurt Hindenburg
2012-08-26 09:13:16 -04:00
parent b121a10af0
commit a70f507b67
3 changed files with 22 additions and 4 deletions

View File

@@ -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();