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

Reopen window in same place #3355

Closed
nicoburns opened this issue Dec 14, 2024 · 1 comment · Fixed by #3579
Closed

Reopen window in same place #3355

nicoburns opened this issue Dec 14, 2024 · 1 comment · Fixed by #3579
Labels
bug Something isn't working cli Related to the dioxus-cli program desktop Suggestions related to the desktop renderer
Milestone

Comments

@nicoburns
Copy link
Contributor

Feature Request

It would be really cool if (when performing a full rebuild of desktop app), the CLI could open the window of the new app at the same size and in the same position as the window of the previous version of the app was when it was killed.

Implement Suggestion

  • Determine the size of the apps window (perhaps by asking it over devtools protocol?)
  • Set window size of new window (perhaps with environment variable?)
@nicoburns nicoburns added desktop Suggestions related to the desktop renderer cli Related to the dioxus-cli program labels Dec 14, 2024
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Dec 14, 2024

It used to do this but then we changed the way we killed apps and this broke. We need to elegantly bring down the app (via sigkill) instead of force killing it with a drop.

All the logic for this exists already - and if you gracefully exit the app and re-open it, then it works.

https://github.com/DioxusLabs/dioxus/blob/main/packages/desktop/src/app.rs#L484

@jkelleyrtp jkelleyrtp added this to the 0.6.2 milestone Jan 7, 2025
@jkelleyrtp jkelleyrtp added the bug Something isn't working label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program desktop Suggestions related to the desktop renderer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants