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.
This commit is contained in:
Martin Gräßlin 2015-08-20 09:09:17 +02:00
parent afd76b80ee
commit 296313b2fc

View file

@ -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--;