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

Wayland: Use suspended event only if supported #97480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented Sep 26, 2024

Might fix #96942.

In a previous PR I made an oversight and checked for the new suspended event even on legacy compositors, breaking suspension for them.1

This patch goes trough the trouble of checking for the xdg_toplevel version and seeing whether we have to use one method or the other.


This also gets rid of the heuristic on "modern" (xdg_toplevel >= 6) compositors.

Needs testing as I only tested it properly on sway, which does not support said event and I don't want to mess this feature again.

Let's see if third time's the charm (might be more depending on how you count it :P ).

Footnotes

  1. It suspended, that worked, but it then immediately unsuspended, and so on.

@Riteo
Copy link
Contributor Author

Riteo commented Sep 27, 2024

Hold on, forgot to add an #ifdef for libdecor. Building this PR without libdecor would obviously fail. Marking this as WIP.

@Riteo Riteo marked this pull request as draft September 27, 2024 15:32
In a previous PR I made an oversight and checked for the new `suspended`
event even on legacy compositors, breaking suspension for them.

This patch goes trough the trouble of checking for the xdg_toplevel
version and seeing whether we have to use one method or the other.
@Riteo
Copy link
Contributor Author

Riteo commented Oct 2, 2024

Ready for reaview!

(Yes it was that easy :P )

@Riteo Riteo marked this pull request as ready for review October 2, 2024 19:28
@Riteo
Copy link
Contributor Author

Riteo commented Oct 2, 2024

(Sorry for the double post)

Although this PR is ready for review I want to point out that it still needs some testing on the "smarter" compositors like kwin.

As you all might have noticed I'm extremely chaotic lately so I might be able to test it myself but no guarantees. External testers are appreciated :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode with Godot Tools stops displaying pop-up information on classes and functions [Wayland/Sway]
2 participants