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

nixos/sway: add wlr portal back with mkDefault #352193

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

Conversation

JohnRTitor
Copy link
Contributor

@JohnRTitor JohnRTitor commented Oct 29, 2024

Regression from #348792
Fixes #352188.

@teutat3s please confirm that idle inhibit issues do not reoccur with this.
Pinging @midirhee12 for testing.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 29, 2024
@JohnRTitor
Copy link
Contributor Author

@ofborg test sway

# Use xdg-desktop-portal-gtk for every portal interface...
default = "gtk";
# ... except for the ScreenCast, Screenshot and Secret
default = lib.mkDefault [ "wlr" "gtk" ];
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to use mkDefault here? If people specify a value, then the list of wlr and gtk is dropped instead of added.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default = lib.mkDefault [ "wlr" "gtk" ];
default = [ "wlr" "gtk" ];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I keep forgetting that string and lists behave differently. And I kind of agree.

Copy link
Member

@teutat3s teutat3s left a comment

Choose a reason for hiding this comment

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

Thank you for creating this PR. I'd like to try to understand the problem in the linked issue before reverting things.

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

I tested #348792 with the wlr and gtk portals in default but unfortunately just noticed now that the PR removed that since my local configuration was overriding it. I also think that we don't need mkDefault here, though.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Oct 30, 2024
@teutat3s
Copy link
Member

teutat3s commented Oct 30, 2024

Because of the bug in x-d-p-gtk mentioned in #348792, re-introducing wlr as default will break Firefox idle inhibit again. What I'd like to understand is: Does removing wlr from default break anything for anyone?

# Use xdg-desktop-portal-gtk for every portal interface...
default = "gtk";
# ... except for the ScreenCast, Screenshot and Secret
default = lib.mkDefault [ "wlr" "gtk" ];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
default = lib.mkDefault [ "wlr" "gtk" ];
default = [ "gtk" ];

@JohnRTitor
Copy link
Contributor Author

re-introducing wlr as default will break Firefox idle inhibit again.

I wonder why though, doesn't gtk come before wlr, it should have precedency, unless I am missing something.

Does removing wlr from default break anything for anyone?

@midirhee12

@teutat3s
Copy link
Member

@JohnRTitor The original PR has the context you are looking for. There is a linked bug in x-d-p-gtk and a reddit post. TL;DR

Firefox supports the Wayland inhibit protocol, but it attempts to use the DBus interfaces first. However, the gtk portal has an issue where it returns success even though the wlr portal/sway doesn't have an implementation for the inhibit method,

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Oct 31, 2024
@JohnRTitor JohnRTitor closed this Jan 7, 2025
@JohnRTitor JohnRTitor deleted the sway-module-fix branch January 7, 2025 08:38
@midirhee12
Copy link
Member

Why was this closed and deleted?

@midirhee12
Copy link
Member

@JohnRTitor This still needed to be merged. So this was unnecessarily closed.

@JohnRTitor
Copy link
Contributor Author

I was just cleaning my branches. And then there's no response to #352193 (comment)

@midirhee12
Copy link
Member

@JohnRTitor Yes, it does. Hence why I made #352188

@midirhee12
Copy link
Member

@JohnRTitor Is it possible that you can bring back the branch? Deleting branches for open PRs is usually not a good idea.

@JohnRTitor JohnRTitor restored the sway-module-fix branch January 7, 2025 08:52
@JohnRTitor JohnRTitor reopened this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: xdg.portal.config.sway.default should be list
6 participants