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

feat: close behaviour for specific window #3589

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Klemen2
Copy link
Contributor

@Klemen2 Klemen2 commented Jan 19, 2025

Currently close behaviour is very limited and cannot be set for specific window. This results in problems with tray icon, where setting WindowCloseBehaviour::LastWindowHides (now DefaultWindowCloseBehaviour::LastWindowHides) will also close the tray icon if windows are not closed in correct order, another option for this issue would be to now set DefaultWindowCloseBehaviour::WindowsHides, but this will result in all windows opening when you click on tray icon which may or may not be intended depending on your app.

With this change it's now possible to:

  • change a specific window behaviour on runtime
  • set a specific window to exit an app
  • set a specific window to hide
    ...

Breaking changes:

  • Config.with_close_behaviour is now Config.with_default_window_close_behaviour
  • WindowCloseBehaviour is now DefaultWindowCloseBehaviour, WindowCloseBehaviour is now for specific window instead

Tested on windows 11

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.

1 participant