summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-01 08:51:18 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-01 10:03:21 +0200
commit3cb7302480390e5149a9cf6f49ac1ca94ef63f97 (patch)
tree831134f1053214ab0d5ba4d406cf7b860ed7c578 /src/plugins/platforms
parent2ff1557937c398a7fb5cc7ba120e7ca3b5eacd36 (diff)
parentf24cc53cc27d8ed4be4c1d0d2df059dd6a6909a9 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/widgets/itemviews/qabstractitemview.cpp src/widgets/itemviews/qabstractitemview_p.h Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp5
2 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 9eb1b26786..434d0ad953 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1599,7 +1599,7 @@ void QWindowsWindow::handleGeometryChange()
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
}
if (testFlag(SynchronousGeometryChangeEvent))
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
qCDebug(lcQpaEvents) << __FUNCTION__ << this << window() << m_data.geometry;
}
@@ -1689,7 +1689,7 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
// Our tests depend on it.
fireExpose(QRegion(qrectFromRECT(ps.rcPaint)), true);
if (!QWindowsContext::instance()->asyncExpose())
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
EndPaint(hwnd, &ps);
return true;
@@ -1749,7 +1749,7 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowState state)
switch (state) {
case Qt::WindowMinimized:
handleHidden();
- QWindowSystemInterface::flushWindowSystemEvents(); // Tell QQuickWindow to stop rendering now.
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); // Tell QQuickWindow to stop rendering now.
break;
case Qt::WindowMaximized:
case Qt::WindowFullScreen:
@@ -1772,7 +1772,7 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowState state)
}
}
if (exposeEventsSent && !QWindowsContext::instance()->asyncExpose())
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
}
break;
default:
@@ -1878,7 +1878,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
if (!wasSync)
clearFlag(SynchronousGeometryChangeEvent);
QWindowSystemInterface::handleGeometryChange(window(), r);
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
} else if (newState != Qt::WindowMinimized) {
// Restore saved state.
unsigned newStyle = m_savedStyle ? m_savedStyle : style();
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index bf1fd2e177..54c93bea39 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2195,8 +2195,11 @@ void QXcbWindow::handleButtonPressEvent(int event_x, int event_y, int root_x, in
const bool isWheel = detail >= 4 && detail <= 7;
if (!isWheel && window() != QGuiApplication::focusWindow()) {
QWindow *w = static_cast<QWindowPrivate *>(QObjectPrivate::get(window()))->eventReceiver();
- if (!(w->flags() & Qt::WindowDoesNotAcceptFocus))
+ if (!(w->flags() & (Qt::WindowDoesNotAcceptFocus | Qt::BypassWindowManagerHint))
+ && w->type() != Qt::ToolTip
+ && w->type() != Qt::Popup) {
w->requestActivate();
+ }
}
updateNetWmUserTime(timestamp);