xbmc: remove WM hacks. WM detection is fine now. dont set _NET_WM_STATE_FULLSCREEN

This commit is contained in:
Stefan Saraev 2014-03-22 20:36:10 +02:00
parent 082202f76b
commit 1bfeffafcf
3 changed files with 29 additions and 70 deletions

View File

@ -11101,48 +11101,3 @@ index 354e206..6bc35b1 100644
--
1.9.0
From a9d8d8a426cd16a72c078c0b6f151f974e65c4ef Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Mon, 17 Mar 2014 12:06:37 +0100
Subject: [PATCH] X11: fix detect of window manager
---
xbmc/windowing/X11/WinSystemX11.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index c95f4ec..1208246 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -905,8 +905,8 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
if (fullscreen && hasWM)
{
- Atom fs = XInternAtom(m_dpy, "_NET_WM_STATE_FULLSCREEN", True);
- XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1);
+ Atom fs = XInternAtom(m_dpy, "_NET_WM_STATE_FULLSCREEN", False);
+ XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", False), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1);
}
// define invisible cursor
@@ -1139,7 +1139,7 @@ bool CWinSystemX11::HasWindowManager()
unsigned long items_read, items_left, i;
char req = 0;
- prop = XInternAtom(m_dpy, "_NET_SUPPORTING_WM_CHECK", True);
+ prop = XInternAtom(m_dpy, "_NET_SUPPORTING_WM_CHECK", False);
if (prop == None)
return false;
status = XGetWindowProperty(m_dpy, DefaultRootWindow(m_dpy), prop,
@@ -1174,7 +1174,7 @@ bool CWinSystemX11::HasWindowManager()
XFree(data);
- prop = XInternAtom(m_dpy, "_NET_WM_NAME", True);
+ prop = XInternAtom(m_dpy, "_NET_WM_NAME", False);
if (prop == None)
{
CLog::Log(LOGDEBUG,"Window Manager Name: ");
--
1.8.5.5

View File

@ -1,25 +0,0 @@
From e616214879880d4d7fd52d58f5f75660ab8c2930 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sun, 16 Mar 2014 19:52:27 +0200
Subject: [PATCH] assume we are runing in a WM
---
xbmc/windowing/X11/WinSystemX11.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index c95f4ec..d1cc658 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -875,7 +875,7 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
vi = glXChooseVisual(m_dpy, m_nScreen, att);
cmap = XCreateColormap(m_dpy, RootWindow(m_dpy, vi->screen), vi->visual, AllocNone);
- bool hasWM = HasWindowManager();
+ bool hasWM = true;
int def_vis = (vi->visual == DefaultVisual(m_dpy, vi->screen));
swa.override_redirect = hasWM ? False : True;
--
1.7.2.5

View File

@ -0,0 +1,29 @@
From 4f6188bc2bcee52ab3a150fff336b58c11f8928a Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 22 Mar 2014 22:18:28 +0200
Subject: [PATCH] dont set _NET_WM_STATE_FULLSCREEN
---
xbmc/windowing/X11/WinSystemX11.cpp | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index c95f4ec..d12e050 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -903,12 +903,6 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
InputOutput, vi->visual,
mask, &swa);
- if (fullscreen && hasWM)
- {
- Atom fs = XInternAtom(m_dpy, "_NET_WM_STATE_FULLSCREEN", True);
- XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1);
- }
-
// define invisible cursor
Pixmap bitmapNoData;
XColor black;
--
1.7.2.5