Hello community,

here is the log from the commit of package libqt5-qtbase for openSUSE:Factory 
checked in at 2014-10-01 11:22:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtbase (Old)
 and      /work/SRC/openSUSE:Factory/.libqt5-qtbase.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqt5-qtbase"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtbase/libqt5-qtbase.changes      
2014-09-24 13:09:18.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libqt5-qtbase.new/libqt5-qtbase.changes 
2014-10-01 11:22:04.000000000 +0200
@@ -1,0 +2,9 @@
+Wed Sep 24 16:23:20 UTC 2014 - m...@suse.com
+
+- Add libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
+  from Michal Srb, bnc#888858
+  * additional check the display name before use SHM, this patch is
+    equivalent to what has been did in Qt4:
+    
https://qt.gitorious.org/qt/qt/source/6a7f06d70e1267d3d995a3c863ba8f748d45e531:src/gui/kernel/qapplication_x11.cpp#L1986
+
+-------------------------------------------------------------------

New:
----
  libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqt5-qtbase.spec ++++++
--- /var/tmp/diff_new_pack.t3wbDT/_old  2014-10-01 11:22:06.000000000 +0200
+++ /var/tmp/diff_new_pack.t3wbDT/_new  2014-10-01 11:22:06.000000000 +0200
@@ -46,6 +46,8 @@
 Patch3:         libqt5-Fix-Gujarati-font.patch
 # PATCH-FIX-UPSTREAM protect-geometry-QTBUG-40584.patch -- 
https://bugreports.qt-project.org/browse/QTBUG-40584
 Patch4:         protect-geometry-QTBUG-40584.patch
+# Patch-FIX-SUSE libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch 
-- bnc#888858
+Patch5:         libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
 # patches 1000-2000 and above from upstream 5.3 branch #
 # patches 2000-3000 and above from upstream 5.4 branch #
 # PATCH-FIX-UPSTREAM f1ee10f81ac18789e9a7dc715b464415ba2bc2b8.patch -- prefer 
QPA implementation in qsystemtrayicon_x11 if available
@@ -141,6 +143,7 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 %patch2000 -p1
 %patch2001 -p1
 %patch2002 -p1


++++++ libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch ++++++
Do not use SHM if display name doesn't look local.

Verifying availability of SHM only by using response of SHM Attach is not
reliable. There is always small chance that when we are a remote client of X
server, we'll get shmid that is already in use by some local X client. In that
case X server can not recognize that it is not accessing our shared memory but
the one of the other client and will report success.

This adds check for display name equivalent to one that was in Qt4. Determining
whether the connection is local/remote from display name is not 100% reliable,
but worked fine for years in Qt4.

Signed-off-by: Michal Srb <m...@suse.com>
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp 
b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index dc677cd..4cd249e 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -117,7 +117,8 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize 
&size, uint depth, QI
     m_shm_info.shmseg = xcb_generate_id(xcb_connection());
 
     const xcb_query_extension_reply_t *shm_reply = 
xcb_get_extension_data(xcb_connection(), &xcb_shm_id);
-    bool shm_present = shm_reply != NULL && shm_reply->present;
+    bool is_local = (!displayName() || displayName()[0] == ':');
+    bool shm_present = is_local && shm_reply != NULL && shm_reply->present;
     xcb_generic_error_t *error = NULL;
     if (shm_present)
         error = xcb_request_check(xcb_connection(), 
xcb_shm_attach_checked(xcb_connection(), m_shm_info.shmseg, m_shm_info.shmid, 
false));
diff --git a/src/plugins/platforms/xcb/qxcbobject.h 
b/src/plugins/platforms/xcb/qxcbobject.h
index 354984c..2ecb5e7 100644
--- a/src/plugins/platforms/xcb/qxcbobject.h
+++ b/src/plugins/platforms/xcb/qxcbobject.h
@@ -56,6 +56,7 @@ public:
 
     xcb_atom_t atom(QXcbAtom::Atom atom) const { return 
m_connection->atom(atom); }
     xcb_connection_t *xcb_connection() const { return 
m_connection->xcb_connection(); }
+    const char *displayName() const { return m_connection->displayName(); }
 
 private:
     QXcbConnection *m_connection;
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to