jgrulich pushed to qt5-qtbase (f21). "QWidget::setWindowRole does nothing (QTBUG-45484)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Jun 3 09:07:36 UTC 2015


From e0cb122fdd28465c36b2e419fcfec624e38d5800 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Mon, 25 May 2015 20:01:48 -0500
Subject: QWidget::setWindowRole does nothing (QTBUG-45484)


diff --git a/0002-xcb-set-SM_CLIENT_ID-property.patch b/0002-xcb-set-SM_CLIENT_ID-property.patch
new file mode 100644
index 0000000..6fb1114
--- /dev/null
+++ b/0002-xcb-set-SM_CLIENT_ID-property.patch
@@ -0,0 +1,39 @@
+From 72de0df09c2fb5b0d61b019753aa4522964113a5 Mon Sep 17 00:00:00 2001
+From: Stefan Becker <chemobejk at gmail.com>
+Date: Mon, 25 May 2015 17:46:49 +0300
+Subject: [PATCH 2/2] xcb: set SM_CLIENT_ID property
+
+SM_CLIENT_ID is required by kwin for proper session management.
+
+Copy the code from the QT4 implementation to the appropriate place in
+QT5.
+
+Task-number: QTBUG-46310
+---
+ src/plugins/platforms/xcb/qxcbwindow.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
+index f8c2ff8..513f556 100644
+--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
++++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
+@@ -530,6 +530,16 @@ void QXcbWindow::create()
+                                    atom(QXcbAtom::WM_CLIENT_LEADER), XCB_ATOM_WINDOW, 32,
+                                    1, &leader));
+ 
++#ifndef QT_NO_SESSIONMANAGER
++    // If we are session managed, inform the window manager about it
++    QByteArray session = qApp->sessionId().toLatin1();
++    if (!session.isEmpty()) {
++        Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, leader,
++                                       atom(QXcbAtom::SM_CLIENT_ID), XCB_ATOM_STRING, 8,
++                                       session.length(), session.constData()));
++    }
++#endif
++
+     /* Add XEMBED info; this operation doesn't initiate the embedding. */
+     quint32 data[] = { XEMBED_VERSION, XEMBED_MAPPED };
+     Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
+-- 
+2.4.0
+
diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec
index b9d0721..0916fa0 100644
--- a/qt5-qtbase.spec
+++ b/qt5-qtbase.spec
@@ -105,6 +105,10 @@ Patch52:  qtbase-opensource-src-5.4.1-QTBUG-33093.patch
 # adapted to apply on top of patch51
 Patch53: qtbase-opensource-src-5.4.1-QTBUG-45484.patch
 
+# https://bugreports.qt.io/browse/QTBUG-46310
+#SM_CLIENT_ID property is not set
+Patch54: https://bugreports.qt.io/secure/attachment/48820/0002-xcb-set-SM_CLIENT_ID-property.patch
+
 ## upstream patches
 # workaround https://bugreports.qt-project.org/browse/QTBUG-43057
 # 'make docs' crash on el6, use qSort instead of std::sort
@@ -389,6 +393,7 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
 %patch51 -p1 -b .QTBUG-42985
 %patch52 -p1 -b .QTBUG-33093
 %patch53 -p1 -b .QTBUG-45484
+%patch54 -p1 -b .QTBUG-46310
 
 %if 0%{?rhel} == 6
 %patch100 -p1 -b .QTBUG-43057
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/commit/?h=f21&id=e0cb122fdd28465c36b2e419fcfec624e38d5800


More information about the scm-commits mailing list