summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 16:35:28 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 16:35:28 (GMT)
commit58bac5551cbeed83a99e257226bb7b40d363bab9 (patch)
tree4c4f47fc20f53a29e4d5dcfa3e59b8e7d523dee3 /src/gui/kernel/qapplication_x11.cpp
parentebecf192abe56c405409343acc2f97eaf9124fc3 (diff)
parent60b09b8915e2095b221eb0a16a76d49e5bb10391 (diff)
downloadQt-58bac5551cbeed83a99e257226bb7b40d363bab9.zip
Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.gz
Qt-58bac5551cbeed83a99e257226bb7b40d363bab9.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: mkspecs/features/symbian/symbian_building.prf src/network/access/qhttpnetworkconnectionchannel.cpp
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index cbc2356..ff98229 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -2335,6 +2335,30 @@ void qt_init(QApplicationPrivate *priv, int,
X11->desktopEnvironment = DE_4DWM;
break;
}
+
+ if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(),
+ ATOM(_NET_SUPPORTING_WM_CHECK),
+ 0, 1024, False, XA_WINDOW, &type,
+ &format, &length, &after, &data) == Success) {
+ if (type == XA_WINDOW && format == 32) {
+ Window windowManagerWindow = *((Window*) data);
+ XFree(data);
+ data = 0;
+
+ if (windowManagerWindow != XNone) {
+ Atom utf8atom = ATOM(UTF8_STRING);
+ if (XGetWindowProperty(QX11Info::display(), windowManagerWindow, ATOM(_NET_WM_NAME),
+ 0, 1024, False, utf8atom, &type,
+ &format, &length, &after, &data) == Success) {
+ if (type == utf8atom && format == 8) {
+ if (qstrcmp((const char *)data, "MCompositor") == 0)
+ X11->desktopEnvironment = DE_MEEGO_COMPOSITOR;
+ }
+ }
+ }
+ }
+ }
+
} while(0);
if (data)