Skip to content
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

donotdisturb: fix fullscreen window detection on Cinnamon #685

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

deltragon
Copy link
Collaborator

Description

Fixes #683.

This broke in #655, where it was not considered that the window under focus could, on X11, be a child window of the actual window, and so the "_NET_WM_STATE" property could be missing. This is the case in Cinnamon, at least for certain windows with focused inputs.
This PR both ensures that we do not crash when the property is missing.
It also switches the detection to find the active window to the "_NET_ACTIVE_WINDOW" property, which is part of EWMH, so older X11 window managers might not support it. However, according to the docs, GTK3 also used that property to get the active window, so this should behave the exact same.

@archisman-panigrahi
Copy link
Collaborator

Verified that it fixes the issue in LM Cinnamon, Ubuntu GNOME, and there is no observable regression in KDE 6.

@archisman-panigrahi archisman-panigrahi merged commit cf4c792 into slgobinath:master Mar 4, 2025
2 checks passed
@deltragon deltragon deleted the fix-dnd-x11 branch March 6, 2025 14:14
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.

GTK4 version not working in Linux Mint Cinnamon
2 participants