diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-04-20 16:02:24 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:22:42 +0100 |
commit | 02fb067980ad2bcdd0c5f509d21071fb743a671a (patch) | |
tree | 81c857ed6fd8c9e04adb377c0d1cf0edbba6d9a5 /libkscreensaver/main.cpp | |
parent | 24210cacbee4c1b00ce252e27cd14d2d3d1ab004 (diff) | |
download | tdelibs-02fb067980ad2bcdd0c5f509d21071fb743a671a.tar.gz tdelibs-02fb067980ad2bcdd0c5f509d21071fb743a671a.zip |
Properly initialize ARGB mode in libtdescreensaver
This resolves an unreported bug whereby many screensavers do not appear when using a compositor
(cherry picked from commit c2692e04d18f85d7214bbc19231b7c3cf488d3fe)
Diffstat (limited to 'libkscreensaver/main.cpp')
-rw-r--r-- | libkscreensaver/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libkscreensaver/main.cpp b/libkscreensaver/main.cpp index e80dd6bff..466182361 100644 --- a/libkscreensaver/main.cpp +++ b/libkscreensaver/main.cpp @@ -34,6 +34,8 @@ #include "kscreensaver.h" #include "kscreensaver_vroot.h" +bool argb_visual = FALSE; + extern "C" { extern const char *kss_applicationName; @@ -98,7 +100,12 @@ KDE_EXPORT int main(int argc, char *argv[]) KCmdLineArgs::addCmdLineOptions(options); +#ifdef HAVE_XCOMPOSITE + KApplication app(KApplication::openX11RGBADisplay()); + argb_visual = app.isX11CompositionAvailable(); +#else KApplication app; +#endif KCrash::setCrashHandler( crashHandler ); KGlobal::locale()->insertCatalogue("klock"); |