Hi, With the gcc5 transition in testing, due to this bug in Qt, I now have the choice between not updating my system at all, or having my entire DE crash every time I (un)plug my external screen. Both of these options are fairly suboptimal ;-)
I saw that Qt5.5 is in experimental. It seems to be mostly installable (I couldn't test, due to some multiarch-packages preventing me from even staging an upgrade to the new gcc). I backported the patch from Qt upstream that fixes this issue; you can find the patch against the Qt debian package attached. Compilation is still on-going, but the patch seems to apply cleanly, and it works upstream. If you could apply this patch, that would be great - with the next Qt upload to experimental, I could finally use Qt5 applications without them crashing all the time :D Kind regards, Ralf
commit 139103ae1850c8f82a497d8823a028f45f565678 Author: Ralf Jung <p...@ralfj.de> Date: Mon Sep 7 18:14:54 2015 +0200 Backport: When a screen comes back online, the windows need to be told about it diff --git a/debian/changelog b/debian/changelog index 61a235c..19ac4d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +qtbase-opensource-src (5.5.0+dfsg-6) UNRELEASED; urgency=medium + + * When a screen comes back online, the windows need to be told + about it (screen_crash.diff) (Closes: #787680) + + -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Mon, 07 Sep 2015 18:13:16 +0200 + qtbase-opensource-src (5.5.0+dfsg-5) experimental; urgency=medium * Update debian/copyright for 5.5.0. diff --git a/debian/patches/screen_crash.patch b/debian/patches/screen_crash.patch new file mode 100644 index 0000000..59b526c --- /dev/null +++ b/debian/patches/screen_crash.patch @@ -0,0 +1,30 @@ +Description: When a screen comes back online, the windows need to be told + about it +Author: Ralf Jung <p...@ralfj.de> +Forwarded: b0b08cc0e4e38504d6b833702f7477aee4e2a192 +Last-Update: 2015-09-07 + +--- + src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- 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.4.6 + diff --git a/debian/patches/series b/debian/patches/series index 148b172..3d777a4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,6 @@ # Backported stuff Fix-compile-error-on-big-endian.patch +screen_crash.patch # Debian specific. gnukfreebsd.diff