Skip to content

Specify transient parent both for drop menu and drop job

Vlad Zahorodnii requested to merge work/zzag/drop-job-transient-parent into master

Currently, the transient parent for the drop job popup is unset, so QtWayland QPA needs to guess the transient parent, otherwise the client would be killed due to violating the xdg-shell protocol.

The popup parent heuristics in QtWayland are based on input events, specifically they check what window the user interacted with last time, i.e. where the last pointer button click has occurred, etc.

When dragging something, the last interacted window will correspond to the drag source, so if a popup needs to be shown, it will likely have the drag source window as the transient parent. This can be a problem. For example, when dragging an item from Kickoff to the desktop, Kickoff window will close when a drop occurs on the desktop.

QtWayland can't work around that. It simply needs to be told proper metadata about the connection of the popup to the parent window. The purpose of the setTransientParent() function is to achieve exactly that.

BUG: 488515

Merge request reports