From 296313b2fc80a7539e53a5483e34850b57c51620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 20 Aug 2015 09:09:17 +0200 Subject: [PATCH] Keep Qt::Popup windows as internal pointer window once they leave window A click outside a popup should close the popup and not be passed to the window at the pointer position. Thus we only update the internal pointer window if the internal pointer window does not represent a visible popup. --- input.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input.cpp b/input.cpp index 14828828aa..92724d7b75 100644 --- a/input.cpp +++ b/input.cpp @@ -547,7 +547,8 @@ void InputRedirection::updatePointerInternalWindow() if (waylandServer()) { bool found = false; const auto &internalClients = waylandServer()->internalClients(); - if (!internalClients.isEmpty()) { + const bool change = m_pointerInternalWindow.isNull() || !(m_pointerInternalWindow->flags().testFlag(Qt::Popup) && m_pointerInternalWindow->isVisible()); + if (!internalClients.isEmpty() && change) { auto it = internalClients.end(); do { it--;