Skip to content

waylandclipboard: roundtrip to get accurate focus state

Fushan Wen requested to merge cherry-pick-dcb254dc into kf5

The current approach is too complicated and not correct anyway. To summarize QGuiApplication::focusWindow is delayed so the focus watcher was introduced, however when the window is hidden and setMimeData called before Wayland events have been processed, then focusWatcher is naturally out of sync, so the check was complicated to work around this state. However the same issue arises when the window is deleted before calling setMimeData. Instead of introducing more complicated checks and workaround roundtrip so the focusWatcher state is up to date before setting the clipboard. BUG:463199 FIXED-IN: 5.103

(cherry picked from commit dcb254dc)

Merge request reports