-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Implement IPlatformLifetimeEvents for X11/Linux #6883
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
Conversation
4cd8a54
to
1ae2e36
Compare
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.
tested, and crashes because of invalid thread.
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.
tested, works LGTM
private static readonly SMLib.IceWatchProc s_iceWatchProcDelegate = IceWatchHandler; | ||
|
||
private bool AllowShutdownCancellation => | ||
Environment.GetEnvironmentVariable("AVALONIA_X11_USE_SESSION_MANAGER") != "0"; |
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.
Wouldn't it be better to add a configuration in AppBuilder instead of an environment variable?
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.
No, this is only intended to be like other X11 switches we already have. @kekekeks and @danwalmsley made this suggestion.
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.
@jmacato that switch should live in X11PlatformOptions
with default value determined by environment variable.
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.
gotcha
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.
LGMT
Implement IPlatformLifetimeEvents for X11/Linux
What does the pull request do?
Allows users to interrupt the shutdown event in Linux via X Session Management Protocol.
Screen.Recording.2021-11-09.at.12.23.22.AM.mp4
What is the current behavior?
There was no way to inhibit shutdowns on Linux, unlike on win/macOS.