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

Check that Xwayland exists before enabling it #9077

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

earboxer
Copy link
Contributor

Describe your PR, what does it fix/add?

Fixes launching Hyprland when you don't have Xwayland installed

Hyprland 0.46 would crash almost immediately if Xwayland wasn't installed unless you put xwayland:enabled = false in your config.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?

I think this is ready for merging

@littleblack111
Copy link
Contributor

littleblack111 commented Jan 16, 2025

wouldn't it be better for it to be set during compile?

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

wouldnt it be better for this check to happen in the ctor of cxwayland so that it skips server

@vaxerski
Copy link
Member

@littleblack111 no

@earboxer
Copy link
Contributor Author

wouldnt it be better for this check to happen in the ctor of cxwayland so that it skips server

Can any of Xwayland work if it's not installed?

I was thinking with putting it here that if it wasn't installed, one could install it, then reload the config and hyprland would initialize xwayland, seeing that prevEnabledXwayland is not the same as PENABLEXWAYLAND.

@vaxerski
Copy link
Member

I was talking about moving the executable check to the ctor of CXWayland. By the way we could also move m_bEnableXWayland -> CXWayland::enabled() (which is based on the ctor arg const bool enabled)

@earboxer earboxer force-pushed the dont-crash-without-xwayland branch from 41baf07 to 9563adf Compare January 17, 2025 23:06
@earboxer earboxer requested a review from vaxerski January 17, 2025 23:11
@earboxer
Copy link
Contributor Author

@vaxerski Good point. Refactored.

I also made it so it doesn't disable xwayland if it was already running and you wanted it enabled but uninstalled it.

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.

3 participants