Skip to content
Commit 7dbb06d8 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix picking drag target

The normal stacking order contains managed and unmanaged windows now.
This kind of breaks dragging from X11 to Wayland clients.

When an X11 client is the drag source, it's going to create an override
redirect window for the drag icon, which is beneath the pointer.

findManagedToplevel() will return the drag icon instead of the window
beneath the drag icon.

The root problem is that normal event processing has different needs. It
doesn't care about window type except when the screen is locked, while
dnd does. Perhaps it also makes sense to check whether the window accepts
focus.

This change introduces a specialized helper to pick the drag target.
Unfortunately, it amounts to some code duplication. On the other hand,
not sure that other options (such as adding flags to findToplevel()) are
better.
parent bcc299c3
Pipeline #355853 passed with stage
in 15 minutes and 27 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment