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

Add support for Application.DispatcherShutdownMode property #17174

Open
lindexi opened this issue Jun 17, 2024 · 1 comment
Open

Add support for Application.DispatcherShutdownMode property #17174

lindexi opened this issue Jun 17, 2024 · 1 comment
Labels
area/windowing Categorizes an issue or PR as relevant to window management difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/enhancement New feature or request triage/untriaged Indicates an issue requires triaging or verification

Comments

@lindexi
Copy link
Contributor

lindexi commented Jun 17, 2024

What would you like to be added

Add support for Application.DispatcherShutdownMode property.

Why is this needed

Now the default behavior is DispatcherShutdownMode.OnLastWindowClose. After multi window supports, we can create a multi window application. So that we need the DispatcherShutdownMode.OnExplicitShutdown mode.

For which platform

Skia (WPF), Skia (Linux X11), Skia (Linux Framebuffer), Skia (GTK)

Anything else we need to know?

No response

@lindexi lindexi added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/enhancement New feature or request triage/untriaged Indicates an issue requires triaging or verification labels Jun 17, 2024
@Youssef1313 Youssef1313 added the area/windowing Categorizes an issue or PR as relevant to window management label Jun 17, 2024
@lindexi
Copy link
Contributor Author

lindexi commented Jul 9, 2024

How can we solve it? We can create an empty window to control the application.

If we need the DispatcherShutdownMode.OnExplicitShutdown mode, we can create an empty window by var controlWindow = new Window();.

Why this hack way can prevent the UNO application exit? Because the last window will be the controlWindow which never be closed.

You can find my demo code in https://github.com/lindexi/lindexi_gd/blob/0a255766f42d373c4c584b7ac1c7cd0dbaed3e95/UnoDemo/DispatcherShutdownMode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windowing Categorizes an issue or PR as relevant to window management difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/enhancement New feature or request triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

2 participants