summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2024-05-20 16:12:09 +0300
committerVlad Zahorodnii <vlad.zahorodnii@kde.org>2024-05-24 13:15:09 +0300
commit911b66dbd66dbad96e5f07a8b9b7ca56cf3b81b9 (patch)
tree76b45443b9c92974af2d8d62b5ad0b0e91070706 /src/client/qwaylanddisplay.cpp
parent1056117966334742ea55e0ce2e57952db939feed (diff)
Client: Try harder to guess the transient parent window
xdg_popup requires a parent surface. On the other hand, Qt is quite permissive, it allows showing a popup window without specifying the transient parent window. Things have been slowly changing and more controls specify the transient parent, but there are still apps that don't do it. For that particular reason, QWaylandWindow has some heuristics to guess the transient parent. Currently, that heuristic works as follows: - If QWindow::transientParent() is set, use that - otherwise use the focus window However, this heuristic doesn't consider that a window can be inactive. For example, user hovers an element in the window while the window has no focus. This change proposes a heuristic that considers the last interacted input device, i.e. - if QWindow::transientParent() is specified, prefer that - if there's a "top" popup, use it - otherwise check the last interacted window With the proposed heuristic, tooltips are less likely to be backed by xdg-toplevel in inactive apps. Pick-to: 6.7 Change-Id: I7e6a607dc38f9e8adce316d3540a9bd9c37cfed4 Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
0 files changed, 0 insertions, 0 deletions