libqt5-qtbase/xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
Dominique Leuenberger 3b1f949c32 Accepting request 338269 from KDE:Qt5
- Added xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch
  and xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
  (kde#341497, qtbug#47385)

- Added QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch

- When in SLE12, use the internal Harfbuzz version instead of the system
  one (which is too old for Qt's requirements)

- Fix-compile-error-on-big-endian.patch: Fix compile error on big endian

OBS-URL: https://build.opensuse.org/request/show/338269
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=47
2015-10-14 14:39:32 +00:00

37 lines
1.6 KiB
Diff

From d72da0b4b2ee089156d1bd614523838b1635bbf5 Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Date: Fri, 4 Sep 2015 13:27:48 +0200
Subject: [PATCH] xcb: fix yet another crash when screens are disconnected
Can't assume that m_screens is not an empty list.
Task-number: QTBUG-42985
Change-Id: I6f9422638c219123dc898813910d03c7afbd1450
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index f65437f..c35b019 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1300,10 +1300,12 @@ void QXcbConnection::sendConnectionEvent(QXcbAtom::Atom a, uint id)
memset(&event, 0, sizeof(event));
const xcb_window_t eventListener = xcb_generate_id(m_connection);
+ xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
+ xcb_screen_t *screen = it.data;
Q_XCB_CALL(xcb_create_window(m_connection, XCB_COPY_FROM_PARENT,
- eventListener, m_screens.at(0)->root(),
+ eventListener, screen->root,
0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
- m_screens.at(0)->screen()->root_visual, 0, 0));
+ screen->root_visual, 0, 0));
event.response_type = XCB_CLIENT_MESSAGE;
event.format = 32;
--
2.3.5