Commit 7a6150c9 authored by Xuetian Weng's avatar Xuetian Weng

add back qt 5.5 for now, rebuild for openssl

parent 5bfa4bcd
From 5944a751857de997ee674a90c2e35ff3adaa655b Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Mon, 8 Jun 2015 14:35:22 +0300
Subject: [PATCH] Fix QWidget::setWindowRole()
Introduce QXcbWindowFunctions::setWmWindowRole() and call it either from
the implementation of QWidget::setWindowRole() or after the creation of
the corresponding QWidgetWindow.
Change-Id: I143450f4673dd707bb491c1d0f0e8b61d564283d
Task-number: QTBUG-45484
---
.../xcbfunctions/qxcbwindowfunctions.h | 10 ++++++++++
src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 3 +++
src/plugins/platforms/xcb/qxcbwindow.cpp | 21 +++++++++++++++++++++
src/plugins/platforms/xcb/qxcbwindow.h | 2 ++
src/widgets/kernel/qwidget.cpp | 12 +++++++-----
5 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
index ae05cf5..a7fe8d9 100644
--- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
+++ b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
@@ -73,6 +73,16 @@ public:
func(window, type);
}
+ typedef void (*SetWmWindowRole)(QWindow *window, const QByteArray &role);
+ static const QByteArray setWmWindowRoleIdentifier() { return QByteArrayLiteral("XcbSetWmWindowRole"); }
+
+ static void setWmWindowRole(QWindow *window, const QByteArray &role)
+ {
+ SetWmWindowRole func = reinterpret_cast<SetWmWindowRole>(QGuiApplication::platformFunction(setWmWindowRoleIdentifier()));
+ if (func)
+ func(window, role);
+ }
+
typedef uint (*VisualId)(QWindow *window);
static const QByteArray visualIdIdentifier() { return QByteArrayLiteral("XcbVisualId"); }
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 8bf9003..3cfdbde 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -392,6 +392,9 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio
if (function == QXcbWindowFunctions::setWmWindowTypeIdentifier()) {
return QFunctionPointer(QXcbWindow::setWmWindowTypeStatic);
}
+ if (function == QXcbWindowFunctions::setWmWindowRoleIdentifier()) {
+ return QFunctionPointer(QXcbWindow::setWmWindowRoleStatic);
+ }
if (function == QXcbWindowFunctions::visualIdIdentifier()) {
return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic));
}
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 6e021ce..edf68d4 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -322,6 +322,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s)
#endif // XCB_USE_XLIB
static const char *wm_window_type_property_id = "_q_xcb_wm_window_type";
+static const char *wm_window_role_property_id = "_q_xcb_wm_window_role";
QXcbWindow::QXcbWindow(QWindow *window)
: QPlatformWindow(window)
@@ -660,6 +661,11 @@ void QXcbWindow::create()
setOpacity(opacity);
if (window()->isTopLevel())
setWindowIcon(window()->icon());
+
+ if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) {
+ QByteArray wmWindowRole = window()->property(wm_window_type_property_id).toByteArray();
+ setWmWindowRole(wmWindowRole);
+ }
}
QXcbWindow::~QXcbWindow()
@@ -1674,6 +1680,14 @@ void QXcbWindow::setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmW
static_cast<QXcbWindow *>(window->handle())->setWmWindowType(windowTypes, window->flags());
}
+void QXcbWindow::setWmWindowRoleStatic(QWindow *window, const QByteArray &role)
+{
+ if (window->handle())
+ static_cast<QXcbWindow *>(window->handle())->setWmWindowRole(role);
+ else
+ window->setProperty(wm_window_role_property_id, role);
+}
+
uint QXcbWindow::visualIdStatic(QWindow *window)
{
if (window && window->handle())
@@ -1839,6 +1853,13 @@ void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::W
xcb_flush(xcb_connection());
}
+void QXcbWindow::setWmWindowRole(const QByteArray &role)
+{
+ Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
+ atom(QXcbAtom::WM_WINDOW_ROLE), XCB_ATOM_STRING, 8,
+ role.size(), role.constData()));
+}
+
class ExposeCompressor
{
public:
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index a379a6f..15d5c1b 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -140,10 +140,12 @@ public:
void updateNetWmUserTime(xcb_timestamp_t timestamp);
static void setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmWindowTypes windowTypes);
+ static void setWmWindowRoleStatic(QWindow *window, const QByteArray &role);
static uint visualIdStatic(QWindow *window);
QXcbWindowFunctions::WmWindowTypes wmWindowTypes() const;
void setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::WindowFlags flags);
+ void setWmWindowRole(const QByteArray &role);
uint visualId() const;
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index bd77e7f..4b64490 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -100,6 +100,7 @@
#include "qwindowcontainer_p.h"
+#include "QtPlatformHeaders/qxcbwindowfunctions.h"
// widget/widget data creation count
//#define QWIDGET_EXTRA_DEBUG
@@ -1451,6 +1452,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
data.window_flags = win->flags();
+ if (!topData()->role.isNull())
+ QXcbWindowFunctions::setWmWindowRole(win, topData()->role.toLatin1());
+
QBackingStore *store = q->backingStore();
if (!store) {
@@ -6254,13 +6258,11 @@ QString QWidget::windowRole() const
*/
void QWidget::setWindowRole(const QString &role)
{
-#if defined(Q_DEAD_CODE_FROM_QT4_X11)
Q_D(QWidget);
+ d->createTLExtra();
d->topData()->role = role;
- d->setWindowRole();
-#else
- Q_UNUSED(role)
-#endif
+ if (windowHandle())
+ QXcbWindowFunctions::setWmWindowRole(windowHandle(), role.toLatin1());
}
/*!
--
2.3.5
From 5e5031527a3b443c93bf9e762c2f47e6786d7a31 Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Thu, 7 May 2015 17:36:57 +0300
Subject: [PATCH] Restore documented behavior for the WA_X11NetWmWindowType*
attributes
Use QXcbWindowFunctions::setWmWindowType() to add the corresponding
types to the window's _NET_WM_WINDOW_TYPE X11 window property.
Change-Id: Ia2413ad7a69ab8d49b448de11dd07c77101a564c
Task-number: QTBUG-39887
---
src/widgets/kernel/qwidget.cpp | 44 ++++++++++++++++++++++++++++++++++++++----
src/widgets/kernel/qwidget_p.h | 3 ++-
2 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2c9cc5c..0f05280 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1414,6 +1414,7 @@ void QWidgetPrivate::create_sys(WId wind
win->setProperty("_q_showWithoutActivating", QVariant(true));
if (q->testAttribute(Qt::WA_MacAlwaysShowToolWindow))
win->setProperty("_q_macAlwaysShowToolWindow", QVariant::fromValue(QVariant(true)));
+ setNetWmWindowTypes();
win->setFlags(data.window_flags);
fixPosIncludesFrame();
if (q->testAttribute(Qt::WA_Moved)
@@ -11149,7 +11150,6 @@ void QWidget::setAttribute(Qt::WidgetAtt
break;
}
-#ifdef Q_DEAD_CODE_FROM_QT4_X11
case Qt::WA_X11NetWmWindowTypeDesktop:
case Qt::WA_X11NetWmWindowTypeDock:
case Qt::WA_X11NetWmWindowTypeToolBar:
@@ -11163,10 +11163,8 @@ void QWidget::setAttribute(Qt::WidgetAtt
case Qt::WA_X11NetWmWindowTypeNotification:
case Qt::WA_X11NetWmWindowTypeCombo:
case Qt::WA_X11NetWmWindowTypeDND:
- if (testAttribute(Qt::WA_WState_Created))
- d->setNetWmWindowTypes();
+ d->setNetWmWindowTypes();
break;
-#endif
case Qt::WA_StaticContents:
if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
@@ -12823,6 +12821,44 @@ void QWidgetPrivate::setWidgetParentHelp
widget->setParent(static_cast<QWidget*>(newParent));
}
+void QWidgetPrivate::setNetWmWindowTypes()
+{
+ Q_Q(QWidget);
+
+ if (!q->windowHandle())
+ return;
+
+ int wmWindowType = 0;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDesktop))
+ wmWindowType |= QXcbWindowFunctions::Desktop;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDock))
+ wmWindowType |= QXcbWindowFunctions::Dock;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeToolBar))
+ wmWindowType |= QXcbWindowFunctions::Toolbar;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeMenu))
+ wmWindowType |= QXcbWindowFunctions::Menu;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeUtility))
+ wmWindowType |= QXcbWindowFunctions::Utility;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeSplash))
+ wmWindowType |= QXcbWindowFunctions::Splash;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDialog))
+ wmWindowType |= QXcbWindowFunctions::Dialog;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu))
+ wmWindowType |= QXcbWindowFunctions::DropDownMenu;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypePopupMenu))
+ wmWindowType |= QXcbWindowFunctions::PopupMenu;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeToolTip))
+ wmWindowType |= QXcbWindowFunctions::Tooltip;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeNotification))
+ wmWindowType |= QXcbWindowFunctions::Notification;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeCombo))
+ wmWindowType |= QXcbWindowFunctions::Combo;
+ if (q->testAttribute(Qt::WA_X11NetWmWindowTypeDND))
+ wmWindowType |= QXcbWindowFunctions::Dnd;
+
+ QXcbWindowFunctions::setWmWindowType(q->windowHandle(), static_cast<QXcbWindowFunctions::WmWindowType>(wmWindowType));
+}
+
/*! \fn Qt::HANDLE QWidget::macCGHandle() const
\internal
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index fe65cb1..dc1c580 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -752,7 +752,6 @@ public:
void setWindowRole();
void sendStartupMessage(const char *message) const;
- void setNetWmWindowTypes();
void x11UpdateIsOpaque();
bool isBackgroundInherited() const;
void updateX11AcceptFocus();
@@ -849,6 +848,8 @@ public:
static bool qt_widget_rgn(QWidget *, short, RgnHandle, bool);
void registerTouchWindow(bool enable = true);
#endif
+ void setNetWmWindowTypes();
+
bool stealKeyboardGrab(bool grab);
bool stealMouseGrab(bool grab);
};
--
2.3.5
This diff is collapsed.
[Desktop Entry]
Name=Qt Assistant
Comment=Shows Qt documentation and examples
Exec=/usr/bin/assistant-qt5
Icon=assistant
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;
[Desktop Entry]
Name=Browser
Comment=Qt5 simple webbrowser
Exec=/opt/qt5/examples/webkitwidgets/browser/browser
Icon=qtlogo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Network;WebBrowser;
--- a/qtwebkit-examples-and-demos/examples/webkitwidgets/browser/data/defaultbookmarks.xbel 2012-12-18 14:04:47.000000000 -0500
+++ b/qtwebkit-examples-and-demos/examples/webkitwidgets/browser/data/defaultbookmarks.xbel 2012-12-30 12:56:20.837594558 -0500
@@ -4,34 +4,25 @@
<folder folded="yes">
<title>Bookmarks Bar</title>
<bookmark href="http://qt-project.org/">
- <title>Qt Home Page</title>
+ <title>Qt Home</title>
</bookmark>
<bookmark href="http://webkit.org/">
<title>WebKit.org</title>
</bookmark>
<bookmark href="http://qt-project.org/doc/">
- <title>Qt Documentation</title>
- </bookmark>
- <bookmark href="http://qt-project.org/quarterly/">
- <title>Qt Quarterly</title>
- </bookmark>
- <bookmark href="http://planet.qt-project.org/">
- <title>Qt Blog</title>
- </bookmark>
- <bookmark href="http://www.qtcentre.org/">
- <title>Qt Centre</title>
+ <title>Qt Docs</title>
</bookmark>
- <bookmark href="http://qt-apps.org/">
- <title>Qt-Apps.org</title>
+ <bookmark href="http://chakra-project.org/index.html">
+ <title>Chakra-Project</title>
</bookmark>
- <bookmark href="http://qt-project.org/wiki/OnlineCommunities/">
- <title>Online Communities</title>
+ <bookmark href="http://chakraos.org/bbs/">
+ <title>Forum</title>
</bookmark>
- <bookmark href="http://xkcd.com/">
- <title>xkcd</title>
+ <bookmark href="http://webchat.freenode.net/?channels=chakra">
+ <title>IRC</title>
</bookmark>
- <bookmark href="http://twitter.com/qtproject">
- <title>Twitter</title>
+ <bookmark href="http://www.youtube.com/html5">
+ <title>YouTube/html5</title>
</bookmark>
</folder>
<folder folded="yes">
[Desktop Entry]
Name=Qt Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt applications
Exec=/usr/bin/designer-qt5
Icon=designer
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
---
src/gui/text/qtextengine.cpp | 1 +
1 file changed, 1 insertion(+)
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1640,6 +1640,7 @@ void QTextEngine::itemize() const
case QChar::Script_Katakana:
case QChar::Script_Bopomofo:
case QChar::Script_Han:
+ case QChar::Script_Gujarati:
analysis[i].script = QChar::Script_Common;
break;
default:
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 <msrb@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
@@ -118,7 +118,8 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *s
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
@@ -48,6 +48,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;
[Desktop Entry]
Name=Qt Linguist
Comment=Add translations to Qt applications
Exec=/usr/bin/linguist-qt5
Icon=linguist
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
[Desktop Entry]
Name=Qt QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
Exec=/usr/lib/qt5/bin/qdbusviewer
Icon=qdbusviewer
Terminal=false
Type=Application
Categories=Qt;Development;Debugger;
[Desktop Entry]
Name=QmlViewer
Comment=Qt5 qml viewer
Exec=/usr/lib/qt5/bin/qmlviewer
Icon=qtlogo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;AudioVideo;Player;
post_install() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
update-desktop-database -q
echo " "
echo " > Qt 4.8"
echo " "
echo " Prefix: /usr"
echo " "
echo " > ATTENTION "
echo " This version of qt is no longer a split package:"
echo " "
echo " qt-tools is integrated in qt"
echo " qt-doc, qt-demos and qt-examples are one new package"
echo " Please install with sudo pacman -S qt-docs"
echo " "
echo " > IMPORTANT "
echo " Be sure to install one of the Phonon backends:"
echo " "
echo " phonon-backend-gstreamer (default)"
echo " phonon-backend-mplayer"
echo " phonon-backend-vlc"
echo " phonon-backend-xine"
echo " "
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}
[Desktop Entry]
Name=Qt Config
Comment=Configure Qt behavior, styles, fonts
Exec=/usr/bin/qtconfig
Icon=qtlogo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Settings;
NoDisplay=true
From c2dd0bb2c7a0468abefb9556dead85456daa851f Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Date: Fri, 4 Sep 2015 14:25:15 +0200
Subject: [PATCH] xcb: don't crash in mapToNative/mapFromNative if the screen
is null
The results will be wrong, but it only happens in rare cases anyway.
Task-number: QTBUG-42985
Task-number: QTBUG-47385
Change-Id: I6438f219f175af2b118e6b3af16b5b626136defa
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 4fdebe1..3b589d2 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -179,6 +179,8 @@ QXcbScreen *QXcbWindow::parentScreen()
QPoint QXcbWindow::mapToNative(const QPoint &pos, const QXcbScreen *screen) const
{
+ if (!screen)
+ return pos;
if (parent())
return pos * int(screen->devicePixelRatio());
else
@@ -186,6 +188,8 @@ QPoint QXcbWindow::mapToNative(const QPoint &pos, const QXcbScreen *screen) cons
}
QPoint QXcbWindow::mapFromNative(const QPoint &pos, const QXcbScreen *screen) const
{
+ if (!screen)
+ return pos;
if (parent())
return pos / int(screen->devicePixelRatio());
else
@@ -193,6 +197,8 @@ QPoint QXcbWindow::mapFromNative(const QPoint &pos, const QXcbScreen *screen) co
}
QRect QXcbWindow::mapToNative(const QRect &rect, const QXcbScreen *screen) const
{
+ if (!screen)
+ return rect;
if (parent())
return mapLocalGeometryToNative(rect, int(screen->devicePixelRatio()));
else
@@ -200,6 +206,8 @@ QRect QXcbWindow::mapToNative(const QRect &rect, const QXcbScreen *screen) const
}
QRect QXcbWindow::mapFromNative(const QRect &rect, const QXcbScreen *screen) const
{
+ if (!screen)
+ return rect;
if (parent())
return mapLocalGeometryFromNative(rect, int(screen->devicePixelRatio()));
else
--
2.3.5
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment