-
-
Notifications
You must be signed in to change notification settings - Fork 826
Force Wayland when WSL 2 GUI enabled. #4572
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Force Wayland on WSL2 if the WSL2 GUI apps feature is enabled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,7 +98,12 @@ | |
| "environment variable set correctly?" | ||
| ) | ||
|
|
||
| IS_WAYLAND = not isinstance(Gdk.Display.get_default(), GdkX11.X11Display) | ||
| IS_WSL2_GUI_ENABLED = os.getenv("WSL2_GUI_APPS_ENABLED", "0") == "1" | ||
|
|
||
| # Force Wayland on WSL2 if the WSL2 GUI apps feature is enabled | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment should also explain why this is necessary, i.e. what is the problem with X11.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On a semi related note… noting that IS_WAYLAND is only used on Toga’s side and is not passed to GTK to enable/disable Wayland support. This means that if things do not work without IS_WAYLAND special casing, then we should work out why the usual method we use to detect Wayland does not work… |
||
| IS_WAYLAND = ( | ||
| not isinstance(Gdk.Display.get_default(), GdkX11.X11Display) or IS_WSL2_GUI_ENABLED | ||
| ) | ||
|
|
||
| # The following imports will fail if the underlying libraries or their API wrappers | ||
| # aren't installed; handle failure gracefully (see | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we wouldn't be able to run at all if GUI apps were disabled, can we rename this to
IS_WSL2?