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

Determine a session is wayland with a better heuristic #104

Merged
merged 1 commit into from Dec 10, 2019

Conversation

worldofpeace
Copy link
Contributor

Using the compiled in string WAYLAND_SESSIONS_DIR had some problems.
In environments like NixOS, which install packages under their
own immutable prefix under /nix/store. this assumption that the package
would be compiled with datadir=/usr/share will break down. Checking
if the directory contains the appropriate string is much simpler and will
work with platforms like NixOS (or others as this setup popularizes).

Copy link
Collaborator

@robert-ancell robert-ancell left a comment

Choose a reason for hiding this comment

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

Just the small whitespace fix but it otherwise looks like a reasonable change to me. It's a bit hacky the way we decide they are Wayland sessions, but there's probably no more reliable way.

liblightdm-gobject/session.c Outdated Show resolved Hide resolved
src/seat.c Outdated Show resolved Hide resolved
Using the compiled in string WAYLAND_SESSIONS_DIR had some problems.
In environments like NixOS, which install packages under their
own immutable prefix under /nix/store. this assumption that the package
would be compiled with `datadir=/usr/share` will break down. Checking
if the directory contains the appropriate string is much simpler and will
work with platforms like NixOS (or others as this setup popularizes).
@worldofpeace
Copy link
Contributor Author

@robert-ancell I've fixed the whitespace. Thanks for the prompt response ✨

@robert-ancell robert-ancell merged commit 03f2189 into canonical:master Dec 10, 2019
@robert-ancell
Copy link
Collaborator

Thanks @worldofpeace!

@worldofpeace worldofpeace deleted the better-wayland-detect branch December 10, 2019 03:54
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.

None yet

2 participants