Skip to content

Remove window flicker and extend duration with open command#1120

Open
BeneSim wants to merge 1 commit intoelkowar:masterfrom
BeneSim:fix-open-flicker
Open

Remove window flicker and extend duration with open command#1120
BeneSim wants to merge 1 commit intoelkowar:masterfrom
BeneSim:fix-open-flicker

Conversation

@BeneSim
Copy link
Copy Markdown

@BeneSim BeneSim commented Jun 18, 2024

Description

This solves a problem that had been already solved in 0d1b5e0 but was reintroduced in a9a35c1. Basically before this, the window has been closed and reopened if it existed, which results in flickering due to the animations.

In addition to removing the window flicker the timer (if started with --duration) will also be renewed. This fixes #892.

Additional Notes

  • This is a breaking change, people who relied on using open to apply new settings to a window will be surprised. However, in 0d1b5e0 it was mentioned that this could and should be solved by reload.
  • With this implementation the window close timer won't be aborted if no --duration has been supplied, e.g.: I open a window with --duration 4s after 3s i open the window again but without --duration -> The window will still close after 1s. This might be counter-intuitive and could be fixed quite easily, I just wasn't sure what behavior to implement.

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

This solves a problem that had been already solved in
0d1b5e0 but was reintroduced in
a9a35c1. Basically before this, the
window has been closed and reopened if it existed, which results in
flickering due to the animations.

In addition to remove the window flicker the timer (if started with
--duration) will also be renewed. This fixes elkowar#892.
@elkowar
Copy link
Copy Markdown
Owner

elkowar commented Aug 25, 2024

I think if the window is re-opened with no duration provided, the timer should be canceled, that seems like the most intuitive behavior to me.

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.

[BUG] Opening a window that is already open closes and reopens it, causing flickering

2 participants