diff --git a/.gitignore b/.gitignore index 9c844e1..73b7e05 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /qtbase-opensource-src-5.4.0.tar.xz +/qtbase-opensource-src-5.4.1.tar.xz diff --git a/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch b/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch deleted file mode 100644 index f167026..0000000 --- a/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 501c510cc3cb6215aed27af7599395480a049667 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Tue, 11 Nov 2014 13:48:27 +0100 -Subject: [PATCH 009/131] Do not apply subpixel gamma-correction on XCB -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -To match rendering of subpixel antialiased text in Qt 4.8 and other -toolkits on X11, we should not apply gamma-correction. This also -makes the rendering of subpixel antialiased text closer to normal -antialiased text. - -Task-number: QTBUG-41590 -Change-Id: I45ad3448334951353657b878d002eea429858f2d -Reviewed-by: Samuel Rødal -Reviewed-by: Sérgio Martins -Reviewed-by: Eskil Abrahamsen Blomfeldt ---- - src/plugins/platforms/xcb/qxcbintegration.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp -index cace087..3818494 100644 ---- a/src/plugins/platforms/xcb/qxcbintegration.cpp -+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp -@@ -427,12 +427,14 @@ QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const - case QPlatformIntegration::StartDragTime: - case QPlatformIntegration::KeyboardAutoRepeatRate: - case QPlatformIntegration::PasswordMaskDelay: -- case QPlatformIntegration::FontSmoothingGamma: - case QPlatformIntegration::StartDragVelocity: - case QPlatformIntegration::UseRtlExtensions: - case QPlatformIntegration::PasswordMaskCharacter: - // TODO using various xcb, gnome or KDE settings - break; // Not implemented, use defaults -+ case QPlatformIntegration::FontSmoothingGamma: -+ // Match Qt 4.8 text rendering, and rendering of other X11 toolkits. -+ return qreal(1.0); - case QPlatformIntegration::StartDragDistance: { - // The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but - // on a high-resolution screen it makes sense to increase it. --- -1.9.3 - diff --git a/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch b/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch deleted file mode 100644 index 1e13016..0000000 --- a/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 404f4281fda764cafdaa5635db995dabc4f1de8c Mon Sep 17 00:00:00 2001 -From: Dmitry Shachnev -Date: Tue, 9 Dec 2014 09:27:53 +0300 -Subject: [PATCH 173/179] qimage_conversions.cpp: Fix build on big endian - systems - -Change-Id: I8149eb2deaa101daf85a957ff48c3a7140c43bbc -Reviewed-by: Timo Jyrinki -Reviewed-by: Allan Sandfeld Jensen ---- - src/gui/image/qimage_conversions.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp -index 17563b1..858a0d9 100644 ---- a/src/gui/image/qimage_conversions.cpp -+++ b/src/gui/image/qimage_conversions.cpp -@@ -2252,7 +2252,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat - convert_ARGB_to_ARGB_PM, - #else - 0, -- 0 -+ 0, - #endif - 0, 0, 0, 0 - }, // Format_RGBA8888 -@@ -2281,7 +2281,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat - #else - 0, - 0, -- 0 -+ 0, - #endif - 0, 0, 0, 0 - }, // Format_RGBA8888_Premultiplied --- -1.9.3 - diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index c526e6f..ffcc9e1 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -32,8 +32,8 @@ Summary: Qt5 - QtBase components Name: qt5-qtbase -Version: 5.4.0 -Release: 13%{?dist} +Version: 5.4.1 +Release: 1%{?dist} # See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -87,12 +87,6 @@ Patch51: qtbase-opensource-src-5.4.0-QTBUG-42985.patch # 'make docs' crash on el6, use qSort instead of std::sort Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch -# Bad font rendering, http://bugzilla.redhat.com/1052389 -# tweak font gamma correction, from: -# https://bugreports.qt-project.org/browse/QTBUG-41590 -Patch109: 0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch -Patch273: 0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch - # macros, be mindful to keep sync'd with macros.qt5 Source1: macros.qt5 %define _qt5 %{name} @@ -107,12 +101,12 @@ Source1: macros.qt5 %define _qt5_docdir %{_docdir}/qt5 %define _qt5_examplesdir %{_qt5_prefix}/examples %define _qt5_headerdir %{_includedir}/qt5 -%define _qt5_importdir %{_qt5_archdatadir}/imports +%define _qt5_importdir %{_qt5_archdatadir}/imports %define _qt5_libdir %{_libdir} %define _qt5_libexecdir %{_qt5_archdatadir}/libexec %define _qt5_plugindir %{_qt5_archdatadir}/plugins %define _qt5_settingsdir %{_sysconfdir}/xdg -%define _qt5_sysconfdir %{_qt5_settingsdir} +%define _qt5_sysconfdir %{_qt5_settingsdir} %define _qt5_translationdir %{_datadir}/qt5/translations # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. @@ -215,14 +209,14 @@ Requires(postun): %{_sbindir}/update-alternatives %define use_gold_linker -no-use-gold-linker %endif -%description +%description Qt is a software toolkit for developing applications. This package contains base tools, like string, xml, and network handling. %package devel -Summary: Development files for %{name} +Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gui%{?_isa} %if 0%{?egl} @@ -250,13 +244,13 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description examples %{summary}. -%package static +%package static Summary: Static library files for %{name} Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: pkgconfig(fontconfig) Requires: pkgconfig(glib-2.0) Requires: pkgconfig(zlib) -%description static +%description static %{summary}. %if "%{?ibase}" != "-no-sql-ibase" @@ -272,21 +266,21 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Summary: MySQL driver for Qt5's SQL classes BuildRequires: mysql-devel Requires: %{name}%{?_isa} = %{version}-%{release} -%description mysql +%description mysql %{summary}. -%package odbc +%package odbc Summary: ODBC driver for Qt5's SQL classes BuildRequires: unixODBC-devel Requires: %{name}%{?_isa} = %{version}-%{release} -%description odbc +%description odbc %{summary}. -%package postgresql +%package postgresql Summary: PostgreSQL driver for Qt5's SQL classes BuildRequires: postgresql-devel Requires: %{name}%{?_isa} = %{version}-%{release} -%description postgresql +%description postgresql %{summary}. %if "%{?tds}" != "-no-sql-tds" @@ -336,16 +330,13 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags %patch100 -p1 -b .QTBUG-43057 %endif -%patch109 -p1 -b .0009 -%patch273 -p1 -b .0173 - # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` %define platform linux-g++ sed -i -e "s|-O2|$RPM_OPT_FLAGS|g" \ - mkspecs/%{platform}/qmake.conf + mkspecs/%{platform}/qmake.conf sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $RPM_LD_FLAGS|" \ mkspecs/common/g++-unix.conf @@ -776,11 +767,11 @@ fi %{_qt5_plugindir}/sqldrivers/libqsqlmysql.so %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake -%files odbc +%files odbc %{_qt5_plugindir}/sqldrivers/libqsqlodbc.so %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake -%files postgresql +%files postgresql %{_qt5_plugindir}/sqldrivers/libqsqlpsql.so %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake @@ -843,6 +834,9 @@ fi %changelog +* Tue Feb 24 2015 Jan Grulich 5.4.1-1 +- update to 5.4.1 + * Mon Feb 16 2015 Rex Dieter 5.4.0-13 - -no-use-gold-linker (f22+, #1193044) @@ -1012,7 +1006,7 @@ fi - fix %%_qt5_examplesdir macro * Sat Jan 25 2014 Rex Dieter 5.2.0-5 -- -examples subpkg +- -examples subpkg * Mon Jan 13 2014 Kevin Kofler - 5.2.0-4 - fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549) @@ -1155,7 +1149,7 @@ fi - 5.0-rc2 - initial try at putting non-conflicting binaries in %%_bindir -* Thu Dec 06 2012 Rex Dieter 5.0.0-0.3.rc1 +* Thu Dec 06 2012 Rex Dieter 5.0.0-0.3.rc1 - 5.0-rc1 * Wed Nov 28 2012 Rex Dieter 5.0.0-0.2.beta2 @@ -1164,7 +1158,7 @@ fi * Mon Nov 19 2012 Rex Dieter 5.0.0-0.1.beta2 - %%build: -accessibility - macros.qt5: +%%_qt5_archdatadir +%%_qt5_settingsdir -- pull in a couple more configure-related upstream patches +- pull in a couple more configure-related upstream patches * Wed Nov 14 2012 Rex Dieter 5.0.0-0.0.beta2 - first try diff --git a/qtbase-opensource-src-5.4.0-QTBUG-42985.patch b/qtbase-opensource-src-5.4.0-QTBUG-42985.patch index a040b78..8f224e5 100644 --- a/qtbase-opensource-src-5.4.0-QTBUG-42985.patch +++ b/qtbase-opensource-src-5.4.0-QTBUG-42985.patch @@ -1,9 +1,11 @@ ---- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.cpp 2014-12-05 17:24:36.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.cpp 2015-01-31 23:42:47.762253331 +0100 -@@ -429,16 +429,40 @@ QList QPlatformIntegration::possibl +diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp +index 39b031e..7f808da 100644 +--- a/src/gui/kernel/qplatformintegration.cpp ++++ b/src/gui/kernel/qplatformintegration.cpp +@@ -429,16 +429,40 @@ QList QPlatformIntegration::possibleKeys(const QKeyEvent *) const This adds the screen to QGuiApplication::screens(), and emits the QGuiApplication::screenAdded() signal. - + + If the added screen is a primary screen (isPrimary = true), it is prepended + to the QGuiApplicationPrivate::screen_list, since + QGuiApplication::primaryScreen always returns the first screen in the list. @@ -23,7 +25,7 @@ + } emit qGuiApp->screenAdded(screen); } - + +/*! + Should be called by the implementation whenever a screen is removed. + @@ -43,20 +45,24 @@ QStringList QPlatformIntegration::themeNames() const { return QStringList(); ---- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.h 2014-12-05 17:24:36.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.h 2015-01-31 20:15:58.620715451 +0100 +diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h +index d510240..5ec7896 100644 +--- a/src/gui/kernel/qplatformintegration.h ++++ b/src/gui/kernel/qplatformintegration.h @@ -169,7 +169,8 @@ public: #endif - + protected: - void screenAdded(QPlatformScreen *screen); + void screenAdded(QPlatformScreen *screen, bool isPrimary = false); + void screenRemoved(QPlatformScreen *screen); }; - + QT_END_NAMESPACE ---- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformscreen.cpp 2014-12-05 17:24:36.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformscreen.cpp 2015-01-31 20:16:25.413205752 +0100 +diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp +index 71710d1..4fb7114 100644 +--- a/src/gui/kernel/qplatformscreen.cpp ++++ b/src/gui/kernel/qplatformscreen.cpp @@ -52,8 +52,6 @@ QPlatformScreen::QPlatformScreen() QPlatformScreen::~QPlatformScreen() { @@ -65,13 +71,15 @@ - QGuiApplicationPrivate::screen_list.removeOne(d->screen); delete d->screen; } - ---- qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.cpp 2014-12-05 17:24:36.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.cpp 2015-01-31 19:30:45.295665651 +0100 -@@ -66,16 +66,6 @@ QScreen::QScreen(QPlatformScreen *screen + +diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp +index ed6e8dd..8909eed 100644 +--- a/src/gui/kernel/qscreen.cpp ++++ b/src/gui/kernel/qscreen.cpp +@@ -66,16 +66,6 @@ QScreen::QScreen(QPlatformScreen *screen) { } - + - -/*! - Destroys the screen. @@ -85,28 +93,32 @@ /*! Get the platform screen handle. */ ---- qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.h 2014-12-05 17:24:36.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.h 2015-01-31 19:30:39.204553634 +0100 -@@ -81,7 +81,6 @@ class Q_GUI_EXPORT QScreen : public QObj +diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h +index 766b3d8..144730a 100644 +--- a/src/gui/kernel/qscreen.h ++++ b/src/gui/kernel/qscreen.h +@@ -81,7 +81,6 @@ class Q_GUI_EXPORT QScreen : public QObject Q_PROPERTY(qreal refreshRate READ refreshRate NOTIFY refreshRateChanged) - + public: - ~QScreen(); QPlatformScreen *handle() const; - + QString name() const; ---- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.cpp 2014-12-05 17:24:37.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.cpp 2015-01-31 15:25:10.611111149 +0100 -@@ -276,7 +276,7 @@ QXcbClipboard::QXcbClipboard(QXcbConnect +diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp +index f56a29d..0dca2da 100644 +--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp ++++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp +@@ -276,7 +276,7 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c) m_timestamp[QClipboard::Clipboard] = XCB_CURRENT_TIME; m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME; - + - m_screen = connection()->primaryScreen(); + QXcbScreen * screen = connection()->primaryScreen(); - + int x = 0, y = 0, w = 3, h = 3; - -@@ -284,11 +284,11 @@ QXcbClipboard::QXcbClipboard(QXcbConnect + +@@ -284,11 +284,11 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c) Q_XCB_CALL(xcb_create_window(xcb_connection(), XCB_COPY_FROM_PARENT, // depth -- same as root m_owner, // window id @@ -120,10 +132,10 @@ 0, // value mask 0)); // value list #ifndef QT_NO_DEBUG -@@ -462,8 +462,15 @@ bool QXcbClipboard::ownsMode(QClipboard: +@@ -462,8 +462,15 @@ bool QXcbClipboard::ownsMode(QClipboard::Mode mode) const return m_timestamp[mode] != XCB_CURRENT_TIME; } - + +QXcbScreen *QXcbClipboard::screen() const +{ + return connection()->primaryScreen(); @@ -136,7 +148,7 @@ if (!m_requestor) { const int x = 0, y = 0, w = 3, h = 3; QXcbClipboard *that = const_cast(this); -@@ -472,11 +479,11 @@ xcb_window_t QXcbClipboard::requestor() +@@ -472,11 +479,11 @@ xcb_window_t QXcbClipboard::requestor() const Q_XCB_CALL(xcb_create_window(xcb_connection(), XCB_COPY_FROM_PARENT, // depth -- same as root window, // window id @@ -150,29 +162,33 @@ 0, // value mask 0)); // value list #ifndef QT_NO_DEBUG ---- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.h 2014-12-05 17:24:37.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.h 2015-01-31 15:24:53.881807083 +0100 +diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h +index e76d502..b6cbda4 100644 +--- a/src/plugins/platforms/xcb/qxcbclipboard.h ++++ b/src/plugins/platforms/xcb/qxcbclipboard.h @@ -59,7 +59,7 @@ public: bool supportsMode(QClipboard::Mode mode) const; bool ownsMode(QClipboard::Mode mode) const; - + - QXcbScreen *screen() const { return m_screen; } + QXcbScreen *screen() const; - + xcb_window_t requestor() const; void setRequestor(xcb_window_t window); @@ -91,8 +91,6 @@ private: xcb_atom_t atomForMode(QClipboard::Mode mode) const; QClipboard::Mode modeForAtom(xcb_atom_t atom) const; - + - QXcbScreen *m_screen; - // Selection and Clipboard QXcbClipboardMime *m_xClipboard[2]; QMimeData *m_clientClipboard[2]; ---- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbconnection.cpp 2014-12-05 17:24:37.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-01-31 20:19:49.394941407 +0100 -@@ -182,7 +182,6 @@ QXcbScreen* QXcbConnection::findOrCreate +diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp +index 5510c3b..c9600f0 100644 +--- a/src/plugins/platforms/xcb/qxcbconnection.cpp ++++ b/src/plugins/platforms/xcb/qxcbconnection.cpp +@@ -182,7 +182,6 @@ QXcbScreen* QXcbConnection::findOrCreateScreen(QList& newScreens, void QXcbConnection::updateScreens() { xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup); @@ -218,7 +234,7 @@ @@ -279,28 +277,39 @@ void QXcbConnection::updateScreens() ++xcbScreenNumber; } // for each xcb screen - + - // Now activeScreens is the complete set of screens which are active at this time. - // Delete any existing screens which are not in activeScreens + // Rebuild screen list, ensuring primary screen is always in front, @@ -236,7 +252,7 @@ + screensToDelete.append(m_screens.takeAt(i)); } } - + - // Add any new screens, and make sure the primary screen comes first - // since it is used by QGuiApplication::primaryScreen() + // If there is a new primary screen, add that one first @@ -256,7 +272,7 @@ + m_screens.append(screen); + ((QXcbIntegration*)QGuiApplicationPrivate::platformIntegration())->screenAdded(screen); } - + - // Now that they are in the right order, emit the added signals for new screens only - foreach (QXcbScreen* screen, m_screens) - if (newScreens.contains(screen)) @@ -267,11 +283,13 @@ + delete screen; + } } - + QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, const char *displayName) ---- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.cpp 2014-12-05 17:24:37.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-01-31 23:42:36.248036556 +0100 -@@ -241,9 +241,7 @@ QXcbWindow::QXcbWindow(QWindow *window) +diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp +index 0094278..d17aa7d 100644 +--- a/src/plugins/platforms/xcb/qxcbwindow.cpp ++++ b/src/plugins/platforms/xcb/qxcbwindow.cpp +@@ -257,9 +257,7 @@ QXcbWindow::QXcbWindow(QWindow *window) , m_syncState(NoSyncNeeded) , m_pendingSyncRequest(0) { @@ -279,13 +297,13 @@ - - setConnection(m_screen->connection()); + setConnection(xcbscreen()->connection()); - + if (window->type() != Qt::ForeignWindow) create(); -@@ -282,11 +280,13 @@ void QXcbWindow::create() - +@@ -298,11 +296,13 @@ void QXcbWindow::create() + Qt::WindowType type = window()->type(); - + + QXcbScreen* screen = this->xcbscreen(); + if (type == Qt::Desktop) { @@ -300,16 +318,16 @@ m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask); connection()->addWindowEventListener(m_window, this); return; -@@ -327,7 +327,7 @@ void QXcbWindow::create() +@@ -343,7 +343,7 @@ void QXcbWindow::create() rect.setHeight(defaultWindowHeight); } - + - xcb_window_t xcb_parent_id = m_screen->root(); + xcb_window_t xcb_parent_id = screen->root(); if (parent()) { xcb_parent_id = static_cast(parent())->xcb_window(); m_embedded = parent()->window()->type() == Qt::ForeignWindow; -@@ -342,7 +342,7 @@ void QXcbWindow::create() +@@ -358,7 +358,7 @@ void QXcbWindow::create() #if (defined(XCB_USE_GLX) || defined(XCB_USE_EGL)) && defined(XCB_USE_XLIB) if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { #if defined(XCB_USE_GLX) @@ -318,18 +336,18 @@ #elif defined(XCB_USE_EGL) EGLDisplay eglDisplay = connection()->egl_display(); EGLConfig eglConfig = q_configFromGLFormat(eglDisplay, m_format, true); -@@ -371,8 +371,8 @@ void QXcbWindow::create() +@@ -387,8 +387,8 @@ void QXcbWindow::create() Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(this), xcb_parent_id, visualInfo->visual, AllocNone); - + XSetWindowAttributes a; - a.background_pixel = WhitePixel(DISPLAY_FROM_XCB(this), m_screen->screenNumber()); - a.border_pixel = BlackPixel(DISPLAY_FROM_XCB(this), m_screen->screenNumber()); + a.background_pixel = WhitePixel(DISPLAY_FROM_XCB(this), screen->screenNumber()); + a.border_pixel = BlackPixel(DISPLAY_FROM_XCB(this), screen->screenNumber()); a.colormap = cmap; - + m_visualId = visualInfo->visualid; -@@ -391,14 +391,14 @@ void QXcbWindow::create() +@@ -407,14 +407,14 @@ void QXcbWindow::create() #endif //defined(XCB_USE_GLX) || defined(XCB_USE_EGL) { m_window = xcb_generate_id(xcb_connection()); @@ -337,17 +355,17 @@ - m_depth = m_screen->screen()->root_depth; + m_visualId = screen->screen()->root_visual; + m_depth = screen->screen()->root_depth; - + uint32_t mask = 0; uint32_t values[3]; - + if (m_format.alphaBufferSize() == 8) { - xcb_depth_iterator_t depthIter = xcb_screen_allowed_depths_iterator(m_screen->screen()); + xcb_depth_iterator_t depthIter = xcb_screen_allowed_depths_iterator(screen->screen()); while (depthIter.rem) { if (depthIter.data->depth == 32) { xcb_visualtype_iterator_t visualIter = xcb_depth_visuals_iterator(depthIter.data); -@@ -409,8 +409,8 @@ void QXcbWindow::create() +@@ -425,8 +425,8 @@ void QXcbWindow::create() xcb_create_colormap(xcb_connection(), XCB_COLORMAP_ALLOC_NONE, colormap, xcb_parent_id, m_visualId); mask |= XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_COLORMAP; @@ -358,43 +376,43 @@ values[2] = colormap; break; } -@@ -419,7 +419,7 @@ void QXcbWindow::create() +@@ -435,7 +435,7 @@ void QXcbWindow::create() } } - + - const xcb_visualtype_t *visual = m_screen->visualForId(m_visualId); + const xcb_visualtype_t *visual = screen->visualForId(m_visualId); m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask); - + Q_XCB_CALL(xcb_create_window(xcb_connection(), -@@ -449,7 +449,7 @@ void QXcbWindow::create() +@@ -465,7 +465,7 @@ void QXcbWindow::create() properties[propertyCount++] = atom(QXcbAtom::WM_TAKE_FOCUS); properties[propertyCount++] = atom(QXcbAtom::_NET_WM_PING); - + - m_usingSyncProtocol = m_screen->syncRequestSupported(); + m_usingSyncProtocol = screen->syncRequestSupported(); #if !defined(XCB_USE_GLX) // synced resize only implemented on GLX if (window()->supportsOpenGL()) -@@ -508,7 +508,7 @@ void QXcbWindow::create() - +@@ -524,7 +524,7 @@ void QXcbWindow::create() + xcb_set_wm_hints(xcb_connection(), m_window, &hints); - + - xcb_window_t leader = m_screen->clientLeader(); + xcb_window_t leader = screen->clientLeader(); Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, atom(QXcbAtom::WM_CLIENT_LEADER), XCB_ATOM_WINDOW, 32, 1, &leader)); -@@ -534,7 +534,7 @@ void QXcbWindow::create() - +@@ -550,7 +550,7 @@ void QXcbWindow::create() + #ifdef XCB_USE_XLIB // force sync to read outstanding requests - see QTBUG-29106 - XSync(DISPLAY_FROM_XCB(m_screen), false); + XSync(DISPLAY_FROM_XCB(screen), false); #endif - + #ifndef QT_NO_DRAGANDDROP -@@ -728,7 +728,7 @@ void QXcbWindow::show() +@@ -744,7 +744,7 @@ void QXcbWindow::show() // Default to client leader if there is no transient parent, else modal dialogs can // be hidden by their parents. if (!transientXcbParent) @@ -403,16 +421,16 @@ if (transientXcbParent) { // ICCCM 4.1.2.6 Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, -@@ -756,7 +756,7 @@ void QXcbWindow::show() +@@ -772,7 +772,7 @@ void QXcbWindow::show() if (QGuiApplication::modalWindow() == window()) requestActivateWindow(); - + - m_screen->windowShown(this); + xcbscreen()->windowShown(this); - + connection()->sync(); } -@@ -768,10 +768,10 @@ void QXcbWindow::hide() +@@ -784,10 +784,10 @@ void QXcbWindow::hide() // send synthetic UnmapNotify event according to icccm 4.1.4 xcb_unmap_notify_event_t event; event.response_type = XCB_UNMAP_NOTIFY; @@ -423,27 +441,27 @@ - Q_XCB_CALL(xcb_send_event(xcb_connection(), false, m_screen->root(), + Q_XCB_CALL(xcb_send_event(xcb_connection(), false, xcbscreen()->root(), XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); - + xcb_flush(xcb_connection()); -@@ -1091,7 +1091,7 @@ void QXcbWindow::changeNetWmState(bool s +@@ -1107,7 +1107,7 @@ void QXcbWindow::changeNetWmState(bool set, xcb_atom_t one, xcb_atom_t two) event.data.data32[3] = 0; event.data.data32[4] = 0; - + - Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); + Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbscreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); } - + void QXcbWindow::setWindowState(Qt::WindowState state) -@@ -1132,7 +1132,7 @@ void QXcbWindow::setWindowState(Qt::Wind +@@ -1148,7 +1148,7 @@ void QXcbWindow::setWindowState(Qt::WindowState state) event.data.data32[3] = 0; event.data.data32[4] = 0; - + - Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); + Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbscreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); } break; case Qt::WindowMaximized: -@@ -1375,7 +1375,7 @@ void QXcbWindow::setParent(const QPlatfo +@@ -1391,7 +1391,7 @@ void QXcbWindow::setParent(const QPlatformWindow *parent) xcb_parent_id = qXcbParent->xcb_window(); m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow; } else { @@ -452,35 +470,35 @@ m_embedded = false; } Q_XCB_CALL(xcb_reparent_window(xcb_connection(), xcb_window(), xcb_parent_id, topLeft.x(), topLeft.y())); -@@ -1543,7 +1543,7 @@ void QXcbWindow::requestActivateWindow() +@@ -1559,7 +1559,7 @@ void QXcbWindow::requestActivateWindow() event.data.data32[3] = 0; event.data.data32[4] = 0; - + - Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); + Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbscreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); } else { Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time())); } -@@ -1780,15 +1780,15 @@ void QXcbWindow::handleClientMessageEven +@@ -1796,15 +1796,15 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even relayFocusToModalWindow(); return; } else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_PING)) { - if (event->window == m_screen->root()) + if (event->window == xcbscreen()->root()) return; - + xcb_client_message_event_t reply = *event; - + reply.response_type = XCB_CLIENT_MESSAGE; - reply.window = m_screen->root(); + reply.window = xcbscreen()->root(); - + - xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&reply); + xcb_send_event(xcb_connection(), 0, xcbscreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&reply); xcb_flush(xcb_connection()); } else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_SYNC_REQUEST)) { connection()->setTime(event->data.data32[1]); -@@ -1838,7 +1838,7 @@ void QXcbWindow::handleConfigureNotifyEv +@@ -1871,7 +1871,7 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t * if (!parent() && !fromSendEvent) { // Do not trust the position, query it instead. xcb_translate_coordinates_cookie_t cookie = xcb_translate_coordinates(xcb_connection(), xcb_window(), @@ -489,17 +507,16 @@ xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL); if (reply) { pos.setX(reply->dst_x); -@@ -1853,8 +1853,7 @@ void QXcbWindow::handleConfigureNotifyEv +@@ -1888,7 +1888,7 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t * QWindowSystemInterface::handleGeometryChange(window(), rect); - - QPlatformScreen *newScreen = screenForGeometry(rect); + + QPlatformScreen *newScreen = screenForNativeGeometry(nativeRect); - if (newScreen != m_screen) { -- m_screen = static_cast(newScreen); + if (newScreen != screen()) { + m_screen = static_cast(newScreen); QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen()); - } - -@@ -1892,7 +1891,7 @@ QPoint QXcbWindow::mapToGlobal(const QPo + int newDpr = devicePixelRatio(); +@@ -1933,7 +1933,7 @@ QPoint QXcbWindow::mapToGlobal(const QPoint &pos) const const int dpr = int(devicePixelRatio()); QPoint ret; xcb_translate_coordinates_cookie_t cookie = @@ -508,7 +525,7 @@ pos.x() * dpr, pos.y() * dpr); xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL); -@@ -1913,7 +1912,7 @@ QPoint QXcbWindow::mapFromGlobal(const Q +@@ -1954,7 +1954,7 @@ QPoint QXcbWindow::mapFromGlobal(const QPoint &pos) const const int dpr = int(devicePixelRatio()); QPoint ret; xcb_translate_coordinates_cookie_t cookie = @@ -517,7 +534,7 @@ pos.x() *dpr, pos.y() * dpr); xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL); -@@ -2136,8 +2135,8 @@ void QXcbWindow::handlePropertyNotifyEve +@@ -2178,8 +2178,8 @@ void QXcbWindow::handlePropertyNotifyEvent(const xcb_property_notify_event_t *ev m_windowState = newState; } return; @@ -527,8 +544,8 @@ + xcbscreen()->updateGeometry(event->time); } } - -@@ -2260,7 +2259,7 @@ bool QXcbWindow::startSystemResize(const + +@@ -2308,7 +2308,7 @@ bool QXcbWindow::startSystemResize(const QPoint &pos, Qt::Corner corner) xev.data.data32[3] = XCB_BUTTON_INDEX_1; xev.data.data32[4] = 0; xcb_ungrab_pointer(connection()->xcb_connection(), XCB_CURRENT_TIME); @@ -537,7 +554,7 @@ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (const char *)&xev); return true; -@@ -2396,13 +2395,18 @@ void QXcbWindow::postSyncWindowRequest() +@@ -2444,13 +2444,18 @@ void QXcbWindow::postSyncWindowRequest() if (!m_pendingSyncRequest) { QXcbSyncWindowRequest *e = new QXcbSyncWindowRequest(this); m_pendingSyncRequest = e; @@ -545,7 +562,7 @@ + QCoreApplication::postEvent(xcbscreen()->connection(), e); } } - + qreal QXcbWindow::devicePixelRatio() const { - return m_screen ? m_screen->devicePixelRatio() : 1.0; @@ -556,25 +573,27 @@ +{ + return static_cast(screen()); } - + QT_END_NAMESPACE ---- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.h 2014-12-05 17:24:37.000000000 +0100 -+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.h 2015-01-31 23:25:18.560692091 +0100 +diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h +index 254421e..966a834 100644 +--- a/src/plugins/platforms/xcb/qxcbwindow.h ++++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -152,6 +152,8 @@ public: void postSyncWindowRequest(); void clearSyncWindowRequest() { m_pendingSyncRequest = 0; } - + + QXcbScreen *xcbscreen() const; + qreal devicePixelRatio() const; - - public Q_SLOTS: -@@ -186,8 +188,6 @@ private: + + QPlatformScreen *screenForNativeGeometry(const QRect &newGeometry) const; +@@ -188,8 +190,6 @@ private: void doFocusIn(); void doFocusOut(); - + - QXcbScreen *m_screen; - xcb_window_t m_window; - + uint m_depth; diff --git a/sources b/sources index f556783..9a43291 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eaaa72a5cb25713ca8d17f3a8d149765 qtbase-opensource-src-5.4.0.tar.xz +9507825e558c980fed602de1f16ec7ae qtbase-opensource-src-5.4.1.tar.xz