Skip to content

Recognize drag and drop window type #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

sky1e
Copy link
Contributor

@sky1e sky1e commented Jun 10, 2025

Recognize _NET_WM_WINDOW_TYPE_DND used by discord as a popup, fixing #166.

I tried to add an integration test for it, but found it was failing despite guess_is_popup() returning true for the test window. Ultimately I gave up trying to get the test to work correctly in service of submitting something, and marked the test #[ignore].

Copy link
Owner

@Supreeeme Supreeeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

That test is failing because windows are only marked as popups if there was a previously focused toplevel to actually parent it to. If you move it to the popup_heuristics test (which I'd prefer anyway) it should work.

Comment on lines +1745 to +1750
connection.set_property::<u32>(
discord_dnd,
x::ATOM_WM_SIZE_HINTS,
x::ATOM_WM_HINTS,
&[516, 20, 137, 0, 0, 0, 0, 0, 0],
);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed.

@Supreeeme
Copy link
Owner

I went ahead and fixed the test myself (ef24bce). Thanks!

@Supreeeme Supreeeme closed this Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants