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

fix(windows): ignore resize events when minimized #978

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

ahodesuka
Copy link
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

  • This PR will resolve #___
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary
  • It can be built on all targets and pass CI/CD.

Other information

On Windows when a window is minimized it is set to a minimum size, this size change event and subsequent resize of the webview causes events within the webview contents such as ResizeObervers to fire.

The resizing of the window when minimizing dates back to when Windows did not have a taskbar, and is still used today for cases when the taskbar is unavailable or for MDI (windows within windows). A quick explanation can be found here.

Neither Chrome or Firefox fire off ResizeObserver or DOM resize events when they are minimized on Windows.

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution

src/webview/webview2/mod.rs Outdated Show resolved Hide resolved
@amrbashir amrbashir changed the title fix(windows): Ignore resize events when minimized fix(windows): ignore resize events when minimized Jun 26, 2023
@amrbashir amrbashir merged commit 87b331a into tauri-apps:dev Jun 26, 2023
7 checks passed
@github-actions github-actions bot mentioned this pull request Jun 26, 2023
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.

None yet

2 participants