-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[bug] Visual bugs while resizing windows #4012
Comments
I can confirm this bug in MacOS 11.5 also. Just a HelloWorld Vuetify app (I'm kinda looking for an electron alternative). Edit: The bug in MacOS seems to be only with vertical and diagonal resizing. Screen.Recording.2022-04-30.at.19.19.12.mp4 |
@bgtor can you share the output of |
@lucasfernog Sure Environment Packages App App directory structure |
Is there any workaround for this? |
This seems to be a common problem😭. If you use chromium kernel browsers, they will have this problem when they change size, including edge and chrome. Not only that, I have tried many frameworks that also have this problem, such as QT quick, electron and compose desktop. |
Can confirm, some of these (or all of these?) happen in electron apps too. |
This does seem to be a Chromium issue, as I've personally experienced this issue with a number of Chromium-based browsers for a few years at least. Oddly enough, this project appears to perform resizing much better than any other Tauri app, Electron app, or Chromium-based browser I've ever seen. At least on my machine (Windows 11 build 22000). Can anyone confirm this? |
Closing as this is an issue in chromium itself and inherently Webview2. |
@Pyroglyph I tried that app and It really works way better than other apps that use chromium. Do you have any idea how they did it now? |
I did a little bit of experimenting a while ago and found that including the menu bar at the top seems to alleviate this issue for some reason. It's not completely gone, but it's noticeably better. |
@Pyroglyph You are actually right the with menu It really works way better. Thanks! @amrbashir Hey, I wonder if this issue can be opened again as adding a menu makes the resizing way better. Is this really related to webview? Here is a small comparision With Menu 2022-08-24.17-15-41.mp4Without Menu 2022-08-24.17-16-25.mp4 |
I am afraid we can't do anything about this, it is out of our control. Whenever the window is resized, we tell the webview to resize too, the resizing part is done by the webview itself and as I mentioned earlier this is a common issue with Chromium and inherently Webview2. If you want, you can open a bug report at https://github.com/MicrosoftEdge/WebView2Feedback. |
Hello ! It seems related to this issue : Nasty visual artefacts on resize But we can't change the background color for now since #1564 |
For whatever reason, putting the thread to sleep while resizing seems to improve the resizing behavior on Windows see #6322 you can test using this example tauri::Builder::default()
.on_window_event(|e| {
if let WindowEvent::Resized(_) = e.event() {
std::thread::sleep(std::time::Duration::from_nanos(1));
}
})
.run(tauri::generate_context!())
.expect("error while running tauri application"); |
here is a demo of this suggested change. The left is with the sleep, the right is without. 2023-03-01.02-44-14.mp4Its not a perfect fix, but definitely an improvement. |
Hmm, the difference for decorated windows was much bigger than this from what i've seen so far. i never checked undecorated windows tbh. Could you try |
Hard to tell if there is a difference: 2023-03-01.03-02-03.mp4 |
closes tauri-apps#7388 closes tauri-apps#9510 closes tauri-apps#9464 ref tauri-apps#9268 ref tauri-apps#9053 ref tauri-apps#8770 ref tauri-apps#8750 ref tauri-apps#4012
Describe the bug
Resizing the window causes strange visual bugs. Some of these happen on electron too.
Here are a few examples:
2022-04-30_02-49-33.mp4
2022-04-30_02-44-32.mp4
Reproduction
Create an application, and resize the window. You can try our specific application out here: https://github.com/Futurabeast/slimevr-ui/tree/fb3057b80ae5246e408b341227c37568bb819c60
Expected behavior
Window should resize normally
Platform and versions
and the below one is the gif shown, but its actually on windows 11 not windows 10. Not sure why it reports windows 10.
The text was updated successfully, but these errors were encountered: