summaryrefslogtreecommitdiff
path: root/src/client/qwaylandinputdevice.cpp
diff options
context:
space:
mode:
authorJan Grulich <jgrulich@redhat.com>2021-07-16 13:00:03 +0200
committerJan Grulich <jgrulich@redhat.com>2021-10-05 16:16:13 +0200
commit1e57ebd501cfc2255300392cd4565cd034efeed8 (patch)
tree808efb7e600aed6d188ba1cb0da936a7878807e1 /src/client/qwaylandinputdevice.cpp
parentd1ea98ea0d4a7e6f556135d06260f8b77b64d3da (diff)
downloadqtwayland-1e57ebd501cfc2255300392cd4565cd034efeed8.tar.gz
Client: do not empty clipboard when a new popup/window is opened
If we open a new popup or a window within the same app we have to avoid invalidating selection offer when losing focus, because it's still the same client who has the focus and we might not get a new selection offer by the compositor and therefore we would lose clipboard content. Fixes: QTBUG-93474 Change-Id: Ia2ef826c2967b1daf1cdeb085e8dae66d090dbcf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylandinputdevice.cpp')
-rw-r--r--src/client/qwaylandinputdevice.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 78e75d7b..07f37d43 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -1337,14 +1337,6 @@ void QWaylandInputDevice::Keyboard::handleFocusDestroyed()
void QWaylandInputDevice::Keyboard::handleFocusLost()
{
mFocus = nullptr;
-#if QT_CONFIG(clipboard)
- if (auto *dataDevice = mParent->dataDevice())
- dataDevice->invalidateSelectionOffer();
-#endif
-#if QT_CONFIG(wayland_client_primary_selection)
- if (auto *device = mParent->primarySelectionDevice())
- device->invalidateSelectionOffer();
-#endif
mParent->mQDisplay->handleKeyboardFocusChanged(mParent);
mRepeatTimer.stop();
}