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: rendering issue when resizing with devtools open closes #3914 #3814 #3915

Merged
merged 2 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/fix-resize-with-devtools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-runtime-wry": patch
"tauri": patch
---

Fixes a rendering issue when resizing the window with the devtools open.
9 changes: 7 additions & 2 deletions core/tauri-runtime-wry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ use tauri_runtime::{SystemTray, SystemTrayEvent};
use webview2_com::FocusChangedEventHandler;
#[cfg(windows)]
use windows::Win32::{Foundation::HWND, System::WinRT::EventRegistrationToken};
#[cfg(target_os = "macos")]
use wry::application::platform::macos::WindowBuilderExtMacOS;
#[cfg(all(feature = "system-tray", target_os = "macos"))]
use wry::application::platform::macos::{SystemTrayBuilderExtMacOS, SystemTrayExtMacOS};
#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -906,8 +908,6 @@ impl WindowBuilder for WindowBuilderWrapper {

#[cfg(target_os = "macos")]
fn parent_window(mut self, parent: *mut std::ffi::c_void) -> Self {
use wry::application::platform::macos::WindowBuilderExtMacOS;

self.inner = self.inner.with_parent_window(parent);
self
}
Expand Down Expand Up @@ -2687,6 +2687,11 @@ fn create_webview<T: UserEvent>(
#[cfg(windows)]
let proxy = context.proxy.clone();

#[cfg(target_os = "macos")]
{
window_builder.inner = window_builder.inner.with_fullsize_content_view(true);
}

let is_window_transparent = window_builder.inner.window.transparent;
let menu_items = if let Some(menu) = window_builder.menu {
let mut menu_items = HashMap::new();
Expand Down