diff options
author | fritsch <Peter.Fruehberger@gmail.com> | 2015-09-09 07:41:10 +0200 |
---|---|---|
committer | fritsch <Peter.Fruehberger@gmail.com> | 2015-11-03 20:38:54 +0100 |
commit | 2201eb60845ef2fe6d2104617a0e9afd120f4d8e (patch) | |
tree | 428a85e853869a848eeda3003fec4fd8c1bf6897 | |
parent | c9458e6ba1b10e84e221e0149771a6875733d22d (diff) |
Compositors: Only disable them if actually in use
-rw-r--r-- | xbmc/windowing/X11/WinSystemX11.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp index 53c1c1323b..134c4984c9 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -1149,11 +1149,19 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std: XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1); // disable desktop compositing for KDE, when Kodi is in full-screen mode int one = 1; - XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_KDE_NET_WM_BLOCK_COMPOSITING", True), XA_CARDINAL, 32, - PropModeReplace, (unsigned char*) &one, 1); - // standard way for Gnome 3 - XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_BYPASS_COMPOSITOR", True), XA_CARDINAL, 32, - PropModeReplace, (unsigned char*) &one, 1); + Atom composite = XInternAtom(m_dpy, "_KDE_NET_WM_BLOCK_COMPOSITING", True); + if (composite != None) + { + XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_KDE_NET_WM_BLOCK_COMPOSITING", True), XA_CARDINAL, 32, + PropModeReplace, (unsigned char*) &one, 1); + } + composite = XInternAtom(m_dpy, "_NET_WM_BYPASS_COMPOSITOR", True); + if (composite != None) + { + // standard way for Gnome 3 + XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_BYPASS_COMPOSITOR", True), XA_CARDINAL, 32, + PropModeReplace, (unsigned char*) &one, 1); + } } // define invisible cursor |