Update to 5.4.1

This commit is contained in:
Jan Grulich 2015-02-24 15:23:38 +01:00
parent c8544d32b3
commit cb39c45c15
6 changed files with 155 additions and 224 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/qtbase-opensource-src-5.4.0.tar.xz /qtbase-opensource-src-5.4.0.tar.xz
/qtbase-opensource-src-5.4.1.tar.xz

View File

@ -1,45 +0,0 @@
From 501c510cc3cb6215aed27af7599395480a049667 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@digia.com>
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 <srodal@gmail.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
---
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

View File

@ -1,38 +0,0 @@
From 404f4281fda764cafdaa5635db995dabc4f1de8c Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
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 <timo.jyrinki@canonical.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
---
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

View File

@ -32,8 +32,8 @@
Summary: Qt5 - QtBase components Summary: Qt5 - QtBase components
Name: qt5-qtbase Name: qt5-qtbase
Version: 5.4.0 Version: 5.4.1
Release: 13%{?dist} Release: 1%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details # See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions 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 # 'make docs' crash on el6, use qSort instead of std::sort
Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch 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 # macros, be mindful to keep sync'd with macros.qt5
Source1: macros.qt5 Source1: macros.qt5
%define _qt5 %{name} %define _qt5 %{name}
@ -107,12 +101,12 @@ Source1: macros.qt5
%define _qt5_docdir %{_docdir}/qt5 %define _qt5_docdir %{_docdir}/qt5
%define _qt5_examplesdir %{_qt5_prefix}/examples %define _qt5_examplesdir %{_qt5_prefix}/examples
%define _qt5_headerdir %{_includedir}/qt5 %define _qt5_headerdir %{_includedir}/qt5
%define _qt5_importdir %{_qt5_archdatadir}/imports %define _qt5_importdir %{_qt5_archdatadir}/imports
%define _qt5_libdir %{_libdir} %define _qt5_libdir %{_libdir}
%define _qt5_libexecdir %{_qt5_archdatadir}/libexec %define _qt5_libexecdir %{_qt5_archdatadir}/libexec
%define _qt5_plugindir %{_qt5_archdatadir}/plugins %define _qt5_plugindir %{_qt5_archdatadir}/plugins
%define _qt5_settingsdir %{_sysconfdir}/xdg %define _qt5_settingsdir %{_sysconfdir}/xdg
%define _qt5_sysconfdir %{_qt5_settingsdir} %define _qt5_sysconfdir %{_qt5_settingsdir}
%define _qt5_translationdir %{_datadir}/qt5/translations %define _qt5_translationdir %{_datadir}/qt5/translations
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # 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 %define use_gold_linker -no-use-gold-linker
%endif %endif
%description %description
Qt is a software toolkit for developing applications. Qt is a software toolkit for developing applications.
This package contains base tools, like string, xml, and network This package contains base tools, like string, xml, and network
handling. handling.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-gui%{?_isa} Requires: %{name}-gui%{?_isa}
%if 0%{?egl} %if 0%{?egl}
@ -250,13 +244,13 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description examples %description examples
%{summary}. %{summary}.
%package static %package static
Summary: Static library files for %{name} Summary: Static library files for %{name}
Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: pkgconfig(fontconfig) Requires: pkgconfig(fontconfig)
Requires: pkgconfig(glib-2.0) Requires: pkgconfig(glib-2.0)
Requires: pkgconfig(zlib) Requires: pkgconfig(zlib)
%description static %description static
%{summary}. %{summary}.
%if "%{?ibase}" != "-no-sql-ibase" %if "%{?ibase}" != "-no-sql-ibase"
@ -272,21 +266,21 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: MySQL driver for Qt5's SQL classes Summary: MySQL driver for Qt5's SQL classes
BuildRequires: mysql-devel BuildRequires: mysql-devel
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description mysql %description mysql
%{summary}. %{summary}.
%package odbc %package odbc
Summary: ODBC driver for Qt5's SQL classes Summary: ODBC driver for Qt5's SQL classes
BuildRequires: unixODBC-devel BuildRequires: unixODBC-devel
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description odbc %description odbc
%{summary}. %{summary}.
%package postgresql %package postgresql
Summary: PostgreSQL driver for Qt5's SQL classes Summary: PostgreSQL driver for Qt5's SQL classes
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description postgresql %description postgresql
%{summary}. %{summary}.
%if "%{?tds}" != "-no-sql-tds" %if "%{?tds}" != "-no-sql-tds"
@ -336,16 +330,13 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
%patch100 -p1 -b .QTBUG-43057 %patch100 -p1 -b .QTBUG-43057
%endif %endif
%patch109 -p1 -b .0009
%patch273 -p1 -b .0173
# drop -fexceptions from $RPM_OPT_FLAGS # drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
%define platform linux-g++ %define platform linux-g++
sed -i -e "s|-O2|$RPM_OPT_FLAGS|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|" \ sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 $RPM_LD_FLAGS|" \
mkspecs/common/g++-unix.conf mkspecs/common/g++-unix.conf
@ -776,11 +767,11 @@ fi
%{_qt5_plugindir}/sqldrivers/libqsqlmysql.so %{_qt5_plugindir}/sqldrivers/libqsqlmysql.so
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake
%files odbc %files odbc
%{_qt5_plugindir}/sqldrivers/libqsqlodbc.so %{_qt5_plugindir}/sqldrivers/libqsqlodbc.so
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake
%files postgresql %files postgresql
%{_qt5_plugindir}/sqldrivers/libqsqlpsql.so %{_qt5_plugindir}/sqldrivers/libqsqlpsql.so
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake %{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake
@ -843,6 +834,9 @@ fi
%changelog %changelog
* Tue Feb 24 2015 Jan Grulich <jgrulich@redhat.com> 5.4.1-1
- update to 5.4.1
* Mon Feb 16 2015 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-13 * Mon Feb 16 2015 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-13
- -no-use-gold-linker (f22+, #1193044) - -no-use-gold-linker (f22+, #1193044)
@ -1012,7 +1006,7 @@ fi
- fix %%_qt5_examplesdir macro - fix %%_qt5_examplesdir macro
* Sat Jan 25 2014 Rex Dieter <rdieter@fedoraproject.org> 5.2.0-5 * Sat Jan 25 2014 Rex Dieter <rdieter@fedoraproject.org> 5.2.0-5
- -examples subpkg - -examples subpkg
* Mon Jan 13 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.2.0-4 * Mon Jan 13 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.2.0-4
- fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549) - fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549)
@ -1155,7 +1149,7 @@ fi
- 5.0-rc2 - 5.0-rc2
- initial try at putting non-conflicting binaries in %%_bindir - initial try at putting non-conflicting binaries in %%_bindir
* Thu Dec 06 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.3.rc1 * Thu Dec 06 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.3.rc1
- 5.0-rc1 - 5.0-rc1
* Wed Nov 28 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.2.beta2 * Wed Nov 28 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.2.beta2
@ -1164,7 +1158,7 @@ fi
* Mon Nov 19 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.1.beta2 * Mon Nov 19 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.1.beta2
- %%build: -accessibility - %%build: -accessibility
- macros.qt5: +%%_qt5_archdatadir +%%_qt5_settingsdir - 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 <rdieter@fedoraproject.org> 5.0.0-0.0.beta2 * Wed Nov 14 2012 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-0.0.beta2
- first try - first try

View File

@ -1,9 +1,11 @@
--- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.cpp 2014-12-05 17:24:36.000000000 +0100 diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.cpp 2015-01-31 23:42:47.762253331 +0100 index 39b031e..7f808da 100644
@@ -429,16 +429,40 @@ QList<int> QPlatformIntegration::possibl --- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -429,16 +429,40 @@ QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const
This adds the screen to QGuiApplication::screens(), and emits the This adds the screen to QGuiApplication::screens(), and emits the
QGuiApplication::screenAdded() signal. QGuiApplication::screenAdded() signal.
+ If the added screen is a primary screen (isPrimary = true), it is prepended + If the added screen is a primary screen (isPrimary = true), it is prepended
+ to the QGuiApplicationPrivate::screen_list, since + to the QGuiApplicationPrivate::screen_list, since
+ QGuiApplication::primaryScreen always returns the first screen in the list. + QGuiApplication::primaryScreen always returns the first screen in the list.
@ -23,7 +25,7 @@
+ } + }
emit qGuiApp->screenAdded(screen); emit qGuiApp->screenAdded(screen);
} }
+/*! +/*!
+ Should be called by the implementation whenever a screen is removed. + Should be called by the implementation whenever a screen is removed.
+ +
@ -43,20 +45,24 @@
QStringList QPlatformIntegration::themeNames() const QStringList QPlatformIntegration::themeNames() const
{ {
return QStringList(); return QStringList();
--- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.h 2014-12-05 17:24:36.000000000 +0100 diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformintegration.h 2015-01-31 20:15:58.620715451 +0100 index d510240..5ec7896 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -169,7 +169,8 @@ public: @@ -169,7 +169,8 @@ public:
#endif #endif
protected: protected:
- void screenAdded(QPlatformScreen *screen); - void screenAdded(QPlatformScreen *screen);
+ void screenAdded(QPlatformScreen *screen, bool isPrimary = false); + void screenAdded(QPlatformScreen *screen, bool isPrimary = false);
+ void screenRemoved(QPlatformScreen *screen); + void screenRemoved(QPlatformScreen *screen);
}; };
QT_END_NAMESPACE QT_END_NAMESPACE
--- qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformscreen.cpp 2014-12-05 17:24:36.000000000 +0100 diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qplatformscreen.cpp 2015-01-31 20:16:25.413205752 +0100 index 71710d1..4fb7114 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -52,8 +52,6 @@ QPlatformScreen::QPlatformScreen() @@ -52,8 +52,6 @@ QPlatformScreen::QPlatformScreen()
QPlatformScreen::~QPlatformScreen() QPlatformScreen::~QPlatformScreen()
{ {
@ -65,13 +71,15 @@
- QGuiApplicationPrivate::screen_list.removeOne(d->screen); - QGuiApplicationPrivate::screen_list.removeOne(d->screen);
delete d->screen; delete d->screen;
} }
--- qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.cpp 2014-12-05 17:24:36.000000000 +0100 diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.cpp 2015-01-31 19:30:45.295665651 +0100 index ed6e8dd..8909eed 100644
@@ -66,16 +66,6 @@ QScreen::QScreen(QPlatformScreen *screen --- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -66,16 +66,6 @@ QScreen::QScreen(QPlatformScreen *screen)
{ {
} }
- -
-/*! -/*!
- Destroys the screen. - Destroys the screen.
@ -85,28 +93,32 @@
/*! /*!
Get the platform screen handle. Get the platform screen handle.
*/ */
--- qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.h 2014-12-05 17:24:36.000000000 +0100 diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h
+++ qtbase-opensource-src-5.4.0/src/gui/kernel/qscreen.h 2015-01-31 19:30:39.204553634 +0100 index 766b3d8..144730a 100644
@@ -81,7 +81,6 @@ class Q_GUI_EXPORT QScreen : public QObj --- 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) Q_PROPERTY(qreal refreshRate READ refreshRate NOTIFY refreshRateChanged)
public: public:
- ~QScreen(); - ~QScreen();
QPlatformScreen *handle() const; QPlatformScreen *handle() const;
QString name() const; QString name() const;
--- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.cpp 2014-12-05 17:24:37.000000000 +0100 diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.cpp 2015-01-31 15:25:10.611111149 +0100 index f56a29d..0dca2da 100644
@@ -276,7 +276,7 @@ QXcbClipboard::QXcbClipboard(QXcbConnect --- 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::Clipboard] = XCB_CURRENT_TIME;
m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME; m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME;
- m_screen = connection()->primaryScreen(); - m_screen = connection()->primaryScreen();
+ QXcbScreen * screen = connection()->primaryScreen(); + QXcbScreen * screen = connection()->primaryScreen();
int x = 0, y = 0, w = 3, h = 3; 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(), Q_XCB_CALL(xcb_create_window(xcb_connection(),
XCB_COPY_FROM_PARENT, // depth -- same as root XCB_COPY_FROM_PARENT, // depth -- same as root
m_owner, // window id m_owner, // window id
@ -120,10 +132,10 @@
0, // value mask 0, // value mask
0)); // value list 0)); // value list
#ifndef QT_NO_DEBUG #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; return m_timestamp[mode] != XCB_CURRENT_TIME;
} }
+QXcbScreen *QXcbClipboard::screen() const +QXcbScreen *QXcbClipboard::screen() const
+{ +{
+ return connection()->primaryScreen(); + return connection()->primaryScreen();
@ -136,7 +148,7 @@
if (!m_requestor) { if (!m_requestor) {
const int x = 0, y = 0, w = 3, h = 3; const int x = 0, y = 0, w = 3, h = 3;
QXcbClipboard *that = const_cast<QXcbClipboard *>(this); QXcbClipboard *that = const_cast<QXcbClipboard *>(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(), Q_XCB_CALL(xcb_create_window(xcb_connection(),
XCB_COPY_FROM_PARENT, // depth -- same as root XCB_COPY_FROM_PARENT, // depth -- same as root
window, // window id window, // window id
@ -150,29 +162,33 @@
0, // value mask 0, // value mask
0)); // value list 0)); // value list
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG
--- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.h 2014-12-05 17:24:37.000000000 +0100 diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h
+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbclipboard.h 2015-01-31 15:24:53.881807083 +0100 index e76d502..b6cbda4 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.h
+++ b/src/plugins/platforms/xcb/qxcbclipboard.h
@@ -59,7 +59,7 @@ public: @@ -59,7 +59,7 @@ public:
bool supportsMode(QClipboard::Mode mode) const; bool supportsMode(QClipboard::Mode mode) const;
bool ownsMode(QClipboard::Mode mode) const; bool ownsMode(QClipboard::Mode mode) const;
- QXcbScreen *screen() const { return m_screen; } - QXcbScreen *screen() const { return m_screen; }
+ QXcbScreen *screen() const; + QXcbScreen *screen() const;
xcb_window_t requestor() const; xcb_window_t requestor() const;
void setRequestor(xcb_window_t window); void setRequestor(xcb_window_t window);
@@ -91,8 +91,6 @@ private: @@ -91,8 +91,6 @@ private:
xcb_atom_t atomForMode(QClipboard::Mode mode) const; xcb_atom_t atomForMode(QClipboard::Mode mode) const;
QClipboard::Mode modeForAtom(xcb_atom_t atom) const; QClipboard::Mode modeForAtom(xcb_atom_t atom) const;
- QXcbScreen *m_screen; - QXcbScreen *m_screen;
- -
// Selection and Clipboard // Selection and Clipboard
QXcbClipboardMime *m_xClipboard[2]; QXcbClipboardMime *m_xClipboard[2];
QMimeData *m_clientClipboard[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 diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-01-31 20:19:49.394941407 +0100 index 5510c3b..c9600f0 100644
@@ -182,7 +182,6 @@ QXcbScreen* QXcbConnection::findOrCreate --- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -182,7 +182,6 @@ QXcbScreen* QXcbConnection::findOrCreateScreen(QList<QXcbScreen *>& newScreens,
void QXcbConnection::updateScreens() void QXcbConnection::updateScreens()
{ {
xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup); xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
@ -218,7 +234,7 @@
@@ -279,28 +277,39 @@ void QXcbConnection::updateScreens() @@ -279,28 +277,39 @@ void QXcbConnection::updateScreens()
++xcbScreenNumber; ++xcbScreenNumber;
} // for each xcb screen } // for each xcb screen
- // Now activeScreens is the complete set of screens which are active at this time. - // Now activeScreens is the complete set of screens which are active at this time.
- // Delete any existing screens which are not in activeScreens - // Delete any existing screens which are not in activeScreens
+ // Rebuild screen list, ensuring primary screen is always in front, + // Rebuild screen list, ensuring primary screen is always in front,
@ -236,7 +252,7 @@
+ screensToDelete.append(m_screens.takeAt(i)); + screensToDelete.append(m_screens.takeAt(i));
} }
} }
- // Add any new screens, and make sure the primary screen comes first - // Add any new screens, and make sure the primary screen comes first
- // since it is used by QGuiApplication::primaryScreen() - // since it is used by QGuiApplication::primaryScreen()
+ // If there is a new primary screen, add that one first + // If there is a new primary screen, add that one first
@ -256,7 +272,7 @@
+ m_screens.append(screen); + m_screens.append(screen);
+ ((QXcbIntegration*)QGuiApplicationPrivate::platformIntegration())->screenAdded(screen); + ((QXcbIntegration*)QGuiApplicationPrivate::platformIntegration())->screenAdded(screen);
} }
- // Now that they are in the right order, emit the added signals for new screens only - // Now that they are in the right order, emit the added signals for new screens only
- foreach (QXcbScreen* screen, m_screens) - foreach (QXcbScreen* screen, m_screens)
- if (newScreens.contains(screen)) - if (newScreens.contains(screen))
@ -267,11 +283,13 @@
+ delete screen; + delete screen;
+ } + }
} }
QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, const char *displayName) 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 diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-01-31 23:42:36.248036556 +0100 index 0094278..d17aa7d 100644
@@ -241,9 +241,7 @@ QXcbWindow::QXcbWindow(QWindow *window) --- 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_syncState(NoSyncNeeded)
, m_pendingSyncRequest(0) , m_pendingSyncRequest(0)
{ {
@ -279,13 +297,13 @@
- -
- setConnection(m_screen->connection()); - setConnection(m_screen->connection());
+ setConnection(xcbscreen()->connection()); + setConnection(xcbscreen()->connection());
if (window->type() != Qt::ForeignWindow) if (window->type() != Qt::ForeignWindow)
create(); create();
@@ -282,11 +280,13 @@ void QXcbWindow::create() @@ -298,11 +296,13 @@ void QXcbWindow::create()
Qt::WindowType type = window()->type(); Qt::WindowType type = window()->type();
+ QXcbScreen* screen = this->xcbscreen(); + QXcbScreen* screen = this->xcbscreen();
+ +
if (type == Qt::Desktop) { if (type == Qt::Desktop) {
@ -300,16 +318,16 @@
m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask); m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask);
connection()->addWindowEventListener(m_window, this); connection()->addWindowEventListener(m_window, this);
return; return;
@@ -327,7 +327,7 @@ void QXcbWindow::create() @@ -343,7 +343,7 @@ void QXcbWindow::create()
rect.setHeight(defaultWindowHeight); rect.setHeight(defaultWindowHeight);
} }
- xcb_window_t xcb_parent_id = m_screen->root(); - xcb_window_t xcb_parent_id = m_screen->root();
+ xcb_window_t xcb_parent_id = screen->root(); + xcb_window_t xcb_parent_id = screen->root();
if (parent()) { if (parent()) {
xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window(); xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window();
m_embedded = parent()->window()->type() == Qt::ForeignWindow; 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 (defined(XCB_USE_GLX) || defined(XCB_USE_EGL)) && defined(XCB_USE_XLIB)
if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
#if defined(XCB_USE_GLX) #if defined(XCB_USE_GLX)
@ -318,18 +336,18 @@
#elif defined(XCB_USE_EGL) #elif defined(XCB_USE_EGL)
EGLDisplay eglDisplay = connection()->egl_display(); EGLDisplay eglDisplay = connection()->egl_display();
EGLConfig eglConfig = q_configFromGLFormat(eglDisplay, m_format, true); 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); Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(this), xcb_parent_id, visualInfo->visual, AllocNone);
XSetWindowAttributes a; XSetWindowAttributes a;
- a.background_pixel = WhitePixel(DISPLAY_FROM_XCB(this), m_screen->screenNumber()); - a.background_pixel = WhitePixel(DISPLAY_FROM_XCB(this), m_screen->screenNumber());
- a.border_pixel = BlackPixel(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.background_pixel = WhitePixel(DISPLAY_FROM_XCB(this), screen->screenNumber());
+ a.border_pixel = BlackPixel(DISPLAY_FROM_XCB(this), screen->screenNumber()); + a.border_pixel = BlackPixel(DISPLAY_FROM_XCB(this), screen->screenNumber());
a.colormap = cmap; a.colormap = cmap;
m_visualId = visualInfo->visualid; 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) #endif //defined(XCB_USE_GLX) || defined(XCB_USE_EGL)
{ {
m_window = xcb_generate_id(xcb_connection()); m_window = xcb_generate_id(xcb_connection());
@ -337,17 +355,17 @@
- m_depth = m_screen->screen()->root_depth; - m_depth = m_screen->screen()->root_depth;
+ m_visualId = screen->screen()->root_visual; + m_visualId = screen->screen()->root_visual;
+ m_depth = screen->screen()->root_depth; + m_depth = screen->screen()->root_depth;
uint32_t mask = 0; uint32_t mask = 0;
uint32_t values[3]; uint32_t values[3];
if (m_format.alphaBufferSize() == 8) { 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(m_screen->screen());
+ xcb_depth_iterator_t depthIter = xcb_screen_allowed_depths_iterator(screen->screen()); + xcb_depth_iterator_t depthIter = xcb_screen_allowed_depths_iterator(screen->screen());
while (depthIter.rem) { while (depthIter.rem) {
if (depthIter.data->depth == 32) { if (depthIter.data->depth == 32) {
xcb_visualtype_iterator_t visualIter = xcb_depth_visuals_iterator(depthIter.data); 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_create_colormap(xcb_connection(), XCB_COLORMAP_ALLOC_NONE, colormap,
xcb_parent_id, m_visualId); xcb_parent_id, m_visualId);
mask |= XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_COLORMAP; mask |= XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_COLORMAP;
@ -358,43 +376,43 @@
values[2] = colormap; values[2] = colormap;
break; 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 = m_screen->visualForId(m_visualId);
+ const xcb_visualtype_t *visual = screen->visualForId(m_visualId); + const xcb_visualtype_t *visual = screen->visualForId(m_visualId);
m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask); m_imageFormat = imageFormatForVisual(m_depth, visual->red_mask, visual->blue_mask);
Q_XCB_CALL(xcb_create_window(xcb_connection(), 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::WM_TAKE_FOCUS);
properties[propertyCount++] = atom(QXcbAtom::_NET_WM_PING); properties[propertyCount++] = atom(QXcbAtom::_NET_WM_PING);
- m_usingSyncProtocol = m_screen->syncRequestSupported(); - m_usingSyncProtocol = m_screen->syncRequestSupported();
+ m_usingSyncProtocol = screen->syncRequestSupported(); + m_usingSyncProtocol = screen->syncRequestSupported();
#if !defined(XCB_USE_GLX) #if !defined(XCB_USE_GLX)
// synced resize only implemented on GLX // synced resize only implemented on GLX
if (window()->supportsOpenGL()) 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_set_wm_hints(xcb_connection(), m_window, &hints);
- xcb_window_t leader = m_screen->clientLeader(); - xcb_window_t leader = m_screen->clientLeader();
+ xcb_window_t leader = screen->clientLeader(); + xcb_window_t leader = screen->clientLeader();
Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
atom(QXcbAtom::WM_CLIENT_LEADER), XCB_ATOM_WINDOW, 32, atom(QXcbAtom::WM_CLIENT_LEADER), XCB_ATOM_WINDOW, 32,
1, &leader)); 1, &leader));
@@ -534,7 +534,7 @@ void QXcbWindow::create() @@ -550,7 +550,7 @@ void QXcbWindow::create()
#ifdef XCB_USE_XLIB #ifdef XCB_USE_XLIB
// force sync to read outstanding requests - see QTBUG-29106 // force sync to read outstanding requests - see QTBUG-29106
- XSync(DISPLAY_FROM_XCB(m_screen), false); - XSync(DISPLAY_FROM_XCB(m_screen), false);
+ XSync(DISPLAY_FROM_XCB(screen), false); + XSync(DISPLAY_FROM_XCB(screen), false);
#endif #endif
#ifndef QT_NO_DRAGANDDROP #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 // Default to client leader if there is no transient parent, else modal dialogs can
// be hidden by their parents. // be hidden by their parents.
if (!transientXcbParent) if (!transientXcbParent)
@ -403,16 +421,16 @@
if (transientXcbParent) { // ICCCM 4.1.2.6 if (transientXcbParent) { // ICCCM 4.1.2.6
Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 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()) if (QGuiApplication::modalWindow() == window())
requestActivateWindow(); requestActivateWindow();
- m_screen->windowShown(this); - m_screen->windowShown(this);
+ xcbscreen()->windowShown(this); + xcbscreen()->windowShown(this);
connection()->sync(); 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 // send synthetic UnmapNotify event according to icccm 4.1.4
xcb_unmap_notify_event_t event; xcb_unmap_notify_event_t event;
event.response_type = XCB_UNMAP_NOTIFY; 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, m_screen->root(),
+ Q_XCB_CALL(xcb_send_event(xcb_connection(), false, xcbscreen()->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_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event));
xcb_flush(xcb_connection()); 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[3] = 0;
event.data.data32[4] = 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, 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)); + 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) 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[3] = 0;
event.data.data32[4] = 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, 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)); + 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; break;
case Qt::WindowMaximized: 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(); xcb_parent_id = qXcbParent->xcb_window();
m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow; m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow;
} else { } else {
@ -452,35 +470,35 @@
m_embedded = false; m_embedded = false;
} }
Q_XCB_CALL(xcb_reparent_window(xcb_connection(), xcb_window(), xcb_parent_id, topLeft.x(), topLeft.y())); 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[3] = 0;
event.data.data32[4] = 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, 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)); + 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 { } else {
Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time())); 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(); relayFocusToModalWindow();
return; return;
} else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_PING)) { } else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_PING)) {
- if (event->window == m_screen->root()) - if (event->window == m_screen->root())
+ if (event->window == xcbscreen()->root()) + if (event->window == xcbscreen()->root())
return; return;
xcb_client_message_event_t reply = *event; xcb_client_message_event_t reply = *event;
reply.response_type = XCB_CLIENT_MESSAGE; reply.response_type = XCB_CLIENT_MESSAGE;
- reply.window = m_screen->root(); - reply.window = m_screen->root();
+ reply.window = xcbscreen()->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, 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_send_event(xcb_connection(), 0, xcbscreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&reply);
xcb_flush(xcb_connection()); xcb_flush(xcb_connection());
} else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_SYNC_REQUEST)) { } else if (event->data.data32[0] == atom(QXcbAtom::_NET_WM_SYNC_REQUEST)) {
connection()->setTime(event->data.data32[1]); 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) { if (!parent() && !fromSendEvent) {
// Do not trust the position, query it instead. // Do not trust the position, query it instead.
xcb_translate_coordinates_cookie_t cookie = xcb_translate_coordinates(xcb_connection(), xcb_window(), 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); xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL);
if (reply) { if (reply) {
pos.setX(reply->dst_x); 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); QWindowSystemInterface::handleGeometryChange(window(), rect);
QPlatformScreen *newScreen = screenForGeometry(rect); QPlatformScreen *newScreen = screenForNativeGeometry(nativeRect);
- if (newScreen != m_screen) { - if (newScreen != m_screen) {
- m_screen = static_cast<QXcbScreen*>(newScreen);
+ if (newScreen != screen()) { + if (newScreen != screen()) {
m_screen = static_cast<QXcbScreen*>(newScreen);
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen()); QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
} int newDpr = devicePixelRatio();
@@ -1933,7 +1933,7 @@ QPoint QXcbWindow::mapToGlobal(const QPoint &pos) const
@@ -1892,7 +1891,7 @@ QPoint QXcbWindow::mapToGlobal(const QPo
const int dpr = int(devicePixelRatio()); const int dpr = int(devicePixelRatio());
QPoint ret; QPoint ret;
xcb_translate_coordinates_cookie_t cookie = xcb_translate_coordinates_cookie_t cookie =
@ -508,7 +525,7 @@
pos.x() * dpr, pos.y() * dpr); pos.x() * dpr, pos.y() * dpr);
xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply_t *reply =
xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL); 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()); const int dpr = int(devicePixelRatio());
QPoint ret; QPoint ret;
xcb_translate_coordinates_cookie_t cookie = xcb_translate_coordinates_cookie_t cookie =
@ -517,7 +534,7 @@
pos.x() *dpr, pos.y() * dpr); pos.x() *dpr, pos.y() * dpr);
xcb_translate_coordinates_reply_t *reply = xcb_translate_coordinates_reply_t *reply =
xcb_translate_coordinates_reply(xcb_connection(), cookie, NULL); 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; m_windowState = newState;
} }
return; return;
@ -527,8 +544,8 @@
+ xcbscreen()->updateGeometry(event->time); + 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[3] = XCB_BUTTON_INDEX_1;
xev.data.data32[4] = 0; xev.data.data32[4] = 0;
xcb_ungrab_pointer(connection()->xcb_connection(), XCB_CURRENT_TIME); xcb_ungrab_pointer(connection()->xcb_connection(), XCB_CURRENT_TIME);
@ -537,7 +554,7 @@
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY,
(const char *)&xev); (const char *)&xev);
return true; return true;
@@ -2396,13 +2395,18 @@ void QXcbWindow::postSyncWindowRequest() @@ -2444,13 +2444,18 @@ void QXcbWindow::postSyncWindowRequest()
if (!m_pendingSyncRequest) { if (!m_pendingSyncRequest) {
QXcbSyncWindowRequest *e = new QXcbSyncWindowRequest(this); QXcbSyncWindowRequest *e = new QXcbSyncWindowRequest(this);
m_pendingSyncRequest = e; m_pendingSyncRequest = e;
@ -545,7 +562,7 @@
+ QCoreApplication::postEvent(xcbscreen()->connection(), e); + QCoreApplication::postEvent(xcbscreen()->connection(), e);
} }
} }
qreal QXcbWindow::devicePixelRatio() const qreal QXcbWindow::devicePixelRatio() const
{ {
- return m_screen ? m_screen->devicePixelRatio() : 1.0; - return m_screen ? m_screen->devicePixelRatio() : 1.0;
@ -556,25 +573,27 @@
+{ +{
+ return static_cast<QXcbScreen *>(screen()); + return static_cast<QXcbScreen *>(screen());
} }
QT_END_NAMESPACE QT_END_NAMESPACE
--- qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.h 2014-12-05 17:24:37.000000000 +0100 diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
+++ qtbase-opensource-src-5.4.0/src/plugins/platforms/xcb/qxcbwindow.h 2015-01-31 23:25:18.560692091 +0100 index 254421e..966a834 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -152,6 +152,8 @@ public: @@ -152,6 +152,8 @@ public:
void postSyncWindowRequest(); void postSyncWindowRequest();
void clearSyncWindowRequest() { m_pendingSyncRequest = 0; } void clearSyncWindowRequest() { m_pendingSyncRequest = 0; }
+ QXcbScreen *xcbscreen() const; + QXcbScreen *xcbscreen() const;
+ +
qreal devicePixelRatio() const; qreal devicePixelRatio() const;
public Q_SLOTS: QPlatformScreen *screenForNativeGeometry(const QRect &newGeometry) const;
@@ -186,8 +188,6 @@ private: @@ -188,8 +190,6 @@ private:
void doFocusIn(); void doFocusIn();
void doFocusOut(); void doFocusOut();
- QXcbScreen *m_screen; - QXcbScreen *m_screen;
- -
xcb_window_t m_window; xcb_window_t m_window;
uint m_depth; uint m_depth;

View File

@ -1 +1 @@
eaaa72a5cb25713ca8d17f3a8d149765 qtbase-opensource-src-5.4.0.tar.xz 9507825e558c980fed602de1f16ec7ae qtbase-opensource-src-5.4.1.tar.xz