Ticket #8357: screensaver.cpp_diff

File screensaver.cpp_diff, 870 bytes (added by Johnny Walker <johnnyjboss@…>, 10 years ago)
Line 
1Index: libs/libmythui/screensaver.cpp
2===================================================================
3--- libs/libmythui/screensaver.cpp      (revision 24161)
4+++ libs/libmythui/screensaver.cpp      (working copy)
5@@ -4,6 +4,7 @@
6 
7 #ifdef USING_X11
8 #include "screensaver-x11.h"
9+#include "screensaver-xdg.h"
10 #endif // USING_X11
11 
12 #if CONFIG_DARWIN
13@@ -19,15 +20,16 @@
14 {
15     if (!ScreenSaverSingleton)
16     {
17
18 #if defined(USING_X11)
19-        ScreenSaverSingleton = new ScreenSaverX11();
20+        if (ScreenSaverXDG::isXDGInstalled())
21+                ScreenSaverSingleton = new ScreenSaverXDG();
22+        else
23+                ScreenSaverSingleton = new ScreenSaverX11();
24 #elif CONFIG_DARWIN
25         ScreenSaverSingleton = new ScreenSaverOSX();
26 #else
27         ScreenSaverSingleton = new ScreenSaverNull();
28 #endif
29     }
30-   
31     return ScreenSaverSingleton;
32 }