diff -Nru qtbase-opensource-src-5.2.1+dfsg/debian/changelog qtbase-opensource-src-5.2.1+dfsg/debian/changelog --- qtbase-opensource-src-5.2.1+dfsg/debian/changelog 2014-03-18 12:42:17.000000000 +0000 +++ qtbase-opensource-src-5.2.1+dfsg/debian/changelog 2014-04-01 12:44:51.000000000 +0000 @@ -1,3 +1,10 @@ +qtbase-opensource-src (5.2.1+dfsg-1ubuntu11) trusty; urgency=medium + + * debian/patches/When-looking-up-the-window-hierarchy-stop-at-foreign.patch + - Cherry-pick a fix to a bug affecting online accounts (LP: #1299712) + + -- Timo Jyrinki Tue, 01 Apr 2014 12:41:00 +0000 + qtbase-opensource-src (5.2.1+dfsg-1ubuntu10) trusty; urgency=medium * Make qt5-qmake Multi-Arch: same since it moved from shipping files in diff -Nru qtbase-opensource-src-5.2.1+dfsg/debian/patches/series qtbase-opensource-src-5.2.1+dfsg/debian/patches/series --- qtbase-opensource-src-5.2.1+dfsg/debian/patches/series 2014-03-18 12:42:17.000000000 +0000 +++ qtbase-opensource-src-5.2.1+dfsg/debian/patches/series 2014-04-01 12:44:51.000000000 +0000 @@ -28,3 +28,4 @@ Fix-log_clusters-calculation-in-HarfBuzz-NG-code-pat.patch Minor-optimization-for-QTextEngine-shapeText.patch HarfBuzz-NG-Hide-characters-that-should-normally-be-.patch +When-looking-up-the-window-hierarchy-stop-at-foreign.patch diff -Nru qtbase-opensource-src-5.2.1+dfsg/debian/patches/When-looking-up-the-window-hierarchy-stop-at-foreign.patch qtbase-opensource-src-5.2.1+dfsg/debian/patches/When-looking-up-the-window-hierarchy-stop-at-foreign.patch --- qtbase-opensource-src-5.2.1+dfsg/debian/patches/When-looking-up-the-window-hierarchy-stop-at-foreign.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtbase-opensource-src-5.2.1+dfsg/debian/patches/When-looking-up-the-window-hierarchy-stop-at-foreign.patch 2014-04-01 12:44:51.000000000 +0000 @@ -0,0 +1,40 @@ +From fa5e611af1bc38ba1305fd1983f7560cbc4aa041 Mon Sep 17 00:00:00 2001 +From: Alberto Mardegan +Date: Mon, 31 Mar 2014 15:25:44 +0300 +Subject: [PATCH] When looking up the window hierarchy, stop at foreign windows + +If the window being activated is an embedded window, the parent window +will be a foreign window (usually not even belonging to the current +process); we shouldn't attempt to focus it. + +Task-number: QTBUG-37984 +Change-Id: I2ea03a86b30bbc43cde643e18e0e1d020e5f2c84 +--- + src/widgets/kernel/qapplication_qpa.cpp | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp +index 2f6e8ac..5a4a459 100644 +--- a/src/widgets/kernel/qapplication_qpa.cpp ++++ b/src/widgets/kernel/qapplication_qpa.cpp +@@ -126,8 +126,15 @@ bool QApplicationPrivate::modalState() + + QWidget *qt_tlw_for_window(QWindow *wnd) + { +- while (wnd && !wnd->isTopLevel()) // QTBUG-32177, wnd might be a QQuickView embedded via window container. +- wnd = wnd->parent(); ++ // QTBUG-32177, wnd might be a QQuickView embedded via window container. ++ while (wnd && !wnd->isTopLevel()) { ++ QWindow *parent = wnd->parent(); ++ // Don't end up in windows not belonging to this application ++ if (parent && parent->type() != Qt::ForeignWindow) ++ wnd = wnd->parent(); ++ else ++ break; ++ } + if (wnd) + foreach (QWidget *tlw, qApp->topLevelWidgets()) + if (tlw->windowHandle() == wnd) +-- +1.9.0 +