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

[FreeDesktop portal] Check for FileChooser and Settings interface availability instead of assuming it's always available. #101812

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jan 19, 2025

Should prevent issues with native file dialogs on broken XDG configs.

Instead of assuming XDG portal is always fully available as long as D-Bus is, adds version checks for FileChooser and Settings interfaces to has_feature and is_dark_mode_supported. Also fixes FEATURE_TEXT_TO_SPEECH handing on X11.

Copy link
Contributor

@Riteo Riteo left a comment

Choose a reason for hiding this comment

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

Code looks good and stuff seems to work, although I still get a "no such interface" error for settings. Apparently it's because not everything checks for is_dark_mode_supported. Maybe we should embed the is_settings_supported check in is_dark_mode and if it fails return false?

… availability instead of assuming it's always available.
@bruvzg
Copy link
Member Author

bruvzg commented Jan 31, 2025

Added check to is_dark_mode as well.

Copy link
Contributor

@Riteo Riteo left a comment

Choose a reason for hiding this comment

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

Tested by stopping xdg-desktop-portal and everything seems to work fine!

@Repiteo Repiteo merged commit 480843c into godotengine:master Feb 3, 2025
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Feb 3, 2025

Thanks!

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.

4 participants