Merge branch 'master' of ssh://pkgs.fedoraproject.org/qt5-qtbase

This commit is contained in:
Helio Chissini de Castro 2015-10-05 14:00:56 -03:00
commit eb072a0480
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From b0b08cc0e4e38504d6b833702f7477aee4e2a192 Mon Sep 17 00:00:00 2001
From: Ralf Jung <post@ralfj.de>
Date: Sun, 5 Jul 2015 12:15:29 +0200
Subject: [PATCH] When a screen comes back online, the windows need to be told
about it
On my system, this fixes the misbehavior of Qt applications when the (only) active screen is
switched, e.g. from an external screen to the laptop.
This behavior is caused by the screen() of widgets to be set to NULL when their screen goes away.
When a new screen comes online, the widgets *should* be told about it, but they are not. The only
place that "maybeSetScreen" is called is when an existing screen changes its geometry, but not
when a screen gets enabled without its geometry being affected in any way (e.g. because it was
just disabled via xrandr, but has been connected all along). This makes sure that "maybeSetScreen"
is also called when a screen gets enabled.
Task-number: QTBUG-47041
Change-Id: Ic72d6beaa544bf9a4efdbea0830b1bc0d6ce5362
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 74f48b0..0867615 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -252,6 +252,14 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
otherScreen->addVirtualSibling(screen);
m_screens << screen;
QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
+
+ // Windows which had null screens have already had expose events by now.
+ // They need to be told the screen is back, it's OK to render.
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
+ QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
+ if (xcbWin)
+ xcbWin->maybeSetScreen(screen);
+ }
}
// else ignore disabled screens
} else if (screen) {
--
2.3.5

View File

@ -95,6 +95,10 @@ Patch51: qtbase-opensource-src-5.5-disconnect_displays.patch
# 'make docs' crash on el6, use qSort instead of std::sort
Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch
# https://codereview.qt-project.org/#/c/120700/
# http://bugreports.qt.io/browse/QTBUG-47041
Patch101: qt5-qtbase-QTBUG-47041.patch
# macros, be mindful to keep sync'd with macros.qt5
Source1: macros.qt5
%define _qt5 %{name}
@ -361,6 +365,7 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
%if 0%{?rhel} == 6
%patch100 -p1 -b .QTBUG-43057
%endif
%patch101 -p1 -b .QTBUG-47041
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
@ -917,10 +922,13 @@ fi
%changelog
* Tue Sep 29 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-1
* Mon Oct 05 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-1
- Update to Qt 5.5.1 RC1
- Patchs 13, 52, 53, 155, 223 removed due to inclusion upstream
* Mon Oct 05 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.0-18
- When a screen comes back online, the windows need to be told about it (QTBUG-47041)
* Wed Aug 19 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.0-17
- unconditionally undo valgrind hack when done (#1255054)