Commit 747aff6b authored by AlmAck's avatar AlmAck
Browse files

qt5.6.0rc first build, Todo: replace qtquick1 and qt5-webkit

parent d6b58194
From 5944a751857de997ee674a90c2e35ff3adaa655b Mon Sep 17 00:00:00 2001
From 8651fafdc958cfd040fc69a084fc7090e5987682 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()
......@@ -10,19 +10,19 @@ the corresponding QWidgetWindow.
Change-Id: I143450f4673dd707bb491c1d0f0e8b61d564283d
Task-number: QTBUG-45484
---
.../xcbfunctions/qxcbwindowfunctions.h | 10 ++++++++++
.../xcbfunctions/qxcbwindowfunctions.h | 8 ++++++++
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(-)
src/widgets/kernel/qwidget.cpp | 11 ++++++-----
5 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
index ae05cf5..a7fe8d9 100644
index 0db2e2a..97e0e1c 100644
--- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
+++ b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h
@@ -73,6 +73,16 @@ public:
func(window, type);
@@ -69,6 +69,14 @@ public:
return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowType, QWindow *, WmWindowType>(setWmWindowTypeIdentifier(), window, type);
}
+ typedef void (*SetWmWindowRole)(QWindow *window, const QByteArray &role);
......@@ -30,33 +30,31 @@ index ae05cf5..a7fe8d9 100644
+
+ static void setWmWindowRole(QWindow *window, const QByteArray &role)
+ {
+ SetWmWindowRole func = reinterpret_cast<SetWmWindowRole>(QGuiApplication::platformFunction(setWmWindowRoleIdentifier()));
+ if (func)
+ func(window, role);
+ return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowRole, QWindow *, const QByteArray &>(setWmWindowRoleIdentifier(), window, role);
+ }
+
typedef uint (*VisualId)(QWindow *window);
static const QByteArray visualIdIdentifier() { return QByteArrayLiteral("XcbVisualId"); }
typedef void (*SetWmWindowIconText)(QWindow *window, const QString &text);
static const QByteArray setWmWindowIconTextIdentifier() { return QByteArrayLiteral("XcbSetWmWindowIconText"); }
static void setWmWindowIconText(QWindow *window, const QString &text)
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 8bf9003..3cfdbde 100644
index dfb0a12..3685d5c 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));
}
@@ -349,6 +349,9 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio
if (function == QXcbWindowFunctions::setWmWindowTypeIdentifier())
return QFunctionPointer(QXcbWindowFunctions::SetWmWindowType(QXcbWindow::setWmWindowTypeStatic));
+ if (function == QXcbWindowFunctions::setWmWindowRoleIdentifier())
+ return QFunctionPointer(QXcbWindowFunctions::SetWmWindowRole(QXcbWindow::setWmWindowRoleStatic));
+
if (function == QXcbWindowFunctions::setWmWindowIconTextIdentifier())
return QFunctionPointer(QXcbWindowFunctions::SetWmWindowIconText(QXcbWindow::setWindowIconTextStatic));
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 6e021ce..edf68d4 100644
index d751c6d..557f143 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)
@@ -262,6 +262,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";
......@@ -64,20 +62,20 @@ index 6e021ce..edf68d4 100644
QXcbWindow::QXcbWindow(QWindow *window)
: QPlatformWindow(window)
@@ -660,6 +661,11 @@ void QXcbWindow::create()
@@ -594,6 +595,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();
+ if (window()->dynamicPropertyNames().contains(wm_window_role_property_id)) {
+ QByteArray wmWindowRole = window()->property(wm_window_role_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());
@@ -1640,6 +1646,14 @@ void QXcbWindow::setWindowIconTextStatic(QWindow *window, const QString &text)
static_cast<QXcbWindow *>(window->handle())->setWindowIconText(text);
}
+void QXcbWindow::setWmWindowRoleStatic(QWindow *window, const QByteArray &role)
......@@ -91,7 +89,7 @@ index 6e021ce..edf68d4 100644
uint QXcbWindow::visualIdStatic(QWindow *window)
{
if (window && window->handle())
@@ -1839,6 +1853,13 @@ void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::W
@@ -1805,6 +1819,13 @@ void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::W
xcb_flush(xcb_connection());
}
......@@ -102,14 +100,14 @@ index 6e021ce..edf68d4 100644
+ role.size(), role.constData()));
+}
+
class ExposeCompressor
void QXcbWindow::setParentRelativeBackPixmapStatic(QWindow *window)
{
public:
if (window->handle())
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index a379a6f..15d5c1b 100644
index 8968664..ebbe5e2 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -140,10 +140,12 @@ public:
@@ -141,10 +141,12 @@ public:
void updateNetWmUserTime(xcb_timestamp_t timestamp);
static void setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmWindowTypes windowTypes);
......@@ -120,21 +118,13 @@ index a379a6f..15d5c1b 100644
void setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::WindowFlags flags);
+ void setWmWindowRole(const QByteArray &role);
uint visualId() const;
static void setWindowIconTextStatic(QWindow *window, const QString &text);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index bd77e7f..4b64490 100644
index 2c9cc5c..29f2b1c 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
@@ -1459,6 +1459,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
data.window_flags = win->flags();
......@@ -144,7 +134,7 @@ index bd77e7f..4b64490 100644
QBackingStore *store = q->backingStore();
if (!store) {
@@ -6254,13 +6258,11 @@ QString QWidget::windowRole() const
@@ -6284,13 +6287,11 @@ QString QWidget::windowRole() const
*/
void QWidget::setWindowRole(const QString &role)
{
......@@ -162,4 +152,4 @@ index bd77e7f..4b64490 100644
/*!
--
2.3.5
2.6.2.2.g1b5ffa3
#
# QT Packages for Chakra, part of chakra-project.org
# QT Packages for Chakra, part of chakraos.org
#
# maintainer: Fabian Kosmale <inkane@chakra-project.org>
# maintainer: Fabian Kosmale <inkane@chakraos.org>
# contributor: Luca Giambonini <almack@chakraos.org>
# heavily sto^H^H^H inspired by Andrea Scarpino' PKGBUILD from Arch
pkgbase=qt5
......@@ -16,10 +17,12 @@ pkgname=('qt5-base'
'qt5-imageformats'
'qt5-location'
'qt5-multimedia'
'qt5-quick1'
# 'qt5-quick1'
'qt5-quickcontrols'
'qt5-quickcontrols2'
'qt5-script'
'qt5-sensors'
'qt5-serialbus'
'qt5-serialport'
'qt5-svg'
'qt5-tools'
......@@ -27,12 +30,15 @@ pkgname=('qt5-base'
'qt5-wayland'
'qt5-webchannel'
'qt5-webengine'
'qt5-webkit'
# 'qt5-webkit'
'qt5-websockets'
'qt5-webview'
'qt5-x11extras'
'qt5-xmlpatterns')
pkgver=5.5.1
pkgrel=4
pkgver=5.6.0RC
subver=5.6.0-rc
_pkgver=5.6
pkgrel=1
arch=('x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')
......@@ -48,31 +54,23 @@ makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb
'gstreamer' 'gst-plugins-base' 'gst-plugins-good'
'gst-plugins-bad' 'gst-plugins-ugly' 'harfbuzz' 'pkg-config'
'libinput' 'yasm' 'git')
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
source=("http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz"
# qt 5.6
'vlc-qt5.patch::https://563458.bugs.gentoo.org/attachment.cgi?id=415738' # fixed in qt 5.6
#_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
#source=("http://download.qt-project.org/official_releases/qt/${_pkgver}/${pkgver}/single/$_pkgfqn.tar.xz"
_pkgfqn="qt-everywhere-opensource-src-${subver}"
source=("http://download.qt-project.org/development_releases/qt/${_pkgver}/${subver}/single/$_pkgfqn.tar.xz"
'0001-Fix-QWidget-setWindowRole.patch'
'0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch'
'libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch'
'xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch'
'xcb-fix-yet-another-crash-when-screens-are-disconnected.patch'
'xcb-glXGetCurrentDisplay-return-null-1.patch::https://github.com/qtproject/qtbase/commit/c8af3160d2514fb973a0d00d5bac324d4f7159f7.patch'
'xcb-glXGetCurrentDisplay-return-null-2.patch::https://github.com/qtproject/qtbase/commit/e8ad49d6cba6521f20b1b08bf65d92fc81c158e4.patch'
# not yet upstream
'libqt5-Fix-Gujarati-font.patch'
# desktop files
'assistant-qt5.desktop' 'designer-qt5.desktop' 'linguist-qt5.desktop' 'qtconfig-qt5.desktop'
'qmlviewer.desktop'
'qdbusviewer-qt5.desktop')
sha1sums=('5933651d46691ff6e919a49f5a380b9a217d30fb'
'c7403ec1c2a1189a661e087b2117d25759b9cc58'
'f0f7287a1967cd9d0208517f4682c040e5ad25f5'
sha1sums=('7401e1d3bd91766e3c6d9a283a14adc30bf6d1e4'
'f69e25beeba8682ef8ca9e8cf978061d75173914'
'4dabcdf77de5325eba5890f356157c006b095cc9'
'eb1fa717a650e95276bcd9f29b97fdb576c90337'
'06e29fffec05e9eae0553a69cc0b8804c8fc537c'
'27af3d679b8bd9fbb98d994b01f270dfa8c475ff'
'd67baddee28774ef4f2f1e2d14ef7a8c892139e4'
'd87664b0d898c86c404e0c6e31ba31a82adb2f16'
'd5dc1de05f00fa9eabce400ef11e7932ed8af550'
'0862a4a39b74d0e447181d7eca31580c9d580bc8'
'b63cab2c86505b594e32b32ae43524090fcb7d29'
......@@ -92,16 +90,11 @@ prepare() {
pushd .
cd qtbase
patch -Np1 -i ../../vlc-qt5.patch # fixed in qt 5.6
patch -Np1 -i ../../0001-Fix-QWidget-setWindowRole.patch
patch -Np1 -i ../../0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch
patch -Np1 -i ../../libqt5-Fix-Gujarati-font.patch
patch -Np1 -i ../../libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
patch -Np1 -i ../../xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch
patch -Np1 -i ../../xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
patch -Np1 -i ../../xcb-glXGetCurrentDisplay-return-null-1.patch
patch -Np1 -i ../../xcb-glXGetCurrentDisplay-return-null-2.patch
popd
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
......@@ -123,8 +116,6 @@ prepare() {
build() {
cd $srcdir/$_pkgfqn
# reenable patch later
# patch -p1 -i "$srcdir/defaultbookmarks_new.diff"
export QTDIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH="${QTDIR}"/qtbase/lib:"${QTDIR}"/qttools/lib:"${LD_LIBRARY_PATH}"
......@@ -180,10 +171,10 @@ build() {
-exec sed -i "s|/usr/lib/qt5/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} +
sed -i "s|/usr/lib/qt5/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" \
"${QTDIR}"/qtbase/qmake/Makefile.qmake-docs
find "${QTDIR}" -name Makefile \
-exec sed -i "s|/usr/lib/qt5/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} +
sed -i "s|/usr/lib/qt5/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" \
qtwebkit/Source/Makefile.api
# find "${QTDIR}" -name Makefile \
# -exec sed -i "s|/usr/lib/qt5/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} +
# sed -i "s|/usr/lib/qt5/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" \
# qtwebkit/Source/Makefile.api
find "${QTDIR}" -name Makefile \
-exec sed -i "s|/usr/lib/qt5/bin/qmlplugindump|${QTDIR}/qtdeclarative/bin/qmlplugindump|g" {} +
......@@ -415,6 +406,16 @@ package_qt5-quick1() {
"${pkgdir}"/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt
}
package_qt5-quickcontrols2() {
pkgdesc='Provides new light-weight set of embedded and mobile orientation controls (Technology Preview)'
depends=('qt5-declarative')
conflicts=('qt5')
options=("debug")
cd ${_pkgfqn}/qtquickcontrols2
make INSTALL_ROOT="${pkgdir}" install
}
package_qt5-quickcontrols() {
pkgdesc='Reusable Qt Quick based UI controls to create classic desktop-style user interfaces'
depends=('qt5-declarative')
......@@ -455,6 +456,18 @@ package_qt5-sensors() {
"${pkgdir}"/usr/share/licenses/${pkgname}/LGPL_EXCEPTION.txt
}
package_qt5-serialbus() {
pkgdesc='Provides classes and functions to access the various industrial serial buses and protocols, such as CAN, ModBus, and others. (Technology Preview)'
depends=('qt5-base')
conflicts=('qt5')
options=("debug")
cd ${_pkgfqn}/qtserialbus
make INSTALL_ROOT="${pkgdir}" install
_prlfix
}
package_qt5-serialport() {
pkgdesc='Provides access to hardware and virtual serial ports'
depends=('qt5-base')
......@@ -598,6 +611,16 @@ package_qt5-websockets() {
_prlfix
}
package_qt5-webview() {
pkgdesc='Provides a way to display web content in a QML application'
depends=('qt5-webengine')
options=("debug")
license=('LGPL')
cd ${_pkgfqn}/qtwebview
make INSTALL_ROOT="${pkgdir}" install
}
package_qt5-x11extras() {
pkgdesc='Provides platform-specific APIs for X11'
depends=('qt5-base')
......
[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">
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