-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[v3] Improve OnShutdown #3189
[v3] Improve OnShutdown #3189
Conversation
Define an interface that all Window(s) need to define. Currently copies the WebviewWindow public api
The constant x-wails-client-id is generated once on startup and then sent with each request to the Wails host. It is used primarily by the server plugin to distinguish different remote sessions.
Linux requires a `gtk_menu_bar` for a gtk_window to display a menu. For the `systray` a `gtk_menu` is needed instead. This change creates the correct type of `impl` for the `Menu` depending on how it is being used.
this shouldn't have been changed to Window
Better flow for improved CLI output Fixed number of methods calculation
Don't auto-inject runtime.
…oroutine, Add `IsDebug` to environment info.
The frontend interaction has been significantly updated, including improvements to the Greet function and the addition of an ongoing time display. Additionally, dependencies in package.json have been updated to their latest versions. Also, redundant print statement was removed from messageprocessor_call.go and changes were made to layout structure and styles in the main.go.tmpl and index.html files.
Make sure the webview is focused on initial show if the window is focused and make behaviour consistent with macOS
… clicks on unfocused window Without this patch there's a really strange behaviour if there are multiple windows. Having two windows with a webview open with an input field. Focusing the input field on one window, then focusing the input field on the second one. Then clicking directly on the non client area of the first one, e.g. to trigger a minimze, the minimize is not executed until the mouse is getting moved. As long as the mouse is not moved the event for the click is blocked and not executed. Using this new mode fixes that problem, but we need to handle ‘alt+f4’ on our own.
If someone wants to handle accelerators they could use the key bindings in a cross-platform way.
This commit adds a robust teardown process for windows on application shutdown. It introduces a field to track the destruction state of each window and checks such before performing window operations. Also, it enhances the destroy functions within application for thorough clean up. Finally, redundant event handlers related to application termination were removed while fixing file generating challenge in go tasks.
The application shutdown process has been significantly reworked to be more efficient and robust. The refactored code removes the event listener for the 'ApplicationTerminate' event. Instead, an in-process flag is added to the 'Quit' method to prevent recursive calls. Additionally, an optional 'OnShutdown' function variable is introduced to allow custom cleanup operations upon app termination.
An option to disable AssetServer logging has been introduced in the application options. This will suppress every request log from the AssetServer if set to true. This adjustment is useful for preventing log saturation in certain scenarios or environments.
Important Auto Review SkippedMore than 25% of the files skipped due to max files limit. Skipping review to prevent low quality review. 127 files out of 231 files are above the max files limit of 75. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Description
Move
OnShutdown
toapplication.Options
.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using
wails doctor
.Test Configuration
Please paste the output of
wails doctor
. If you are unable to run this command, please describe your environment in as much detail as possible.Checklist:
website/src/pages/changelog.mdx
with details of this PR