Skip to content

Commit 80b714a

Browse files
authored
fix: rendering issue when resizing with devtools open closes #3914 #3814 (#3915)
1 parent 485c974 commit 80b714a

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-runtime-wry": patch
3+
"tauri": patch
4+
---
5+
6+
Fixes a rendering issue when resizing the window with the devtools open.

core/tauri-runtime-wry/src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ use tauri_runtime::{SystemTray, SystemTrayEvent};
2828
use webview2_com::FocusChangedEventHandler;
2929
#[cfg(windows)]
3030
use windows::Win32::{Foundation::HWND, System::WinRT::EventRegistrationToken};
31+
#[cfg(target_os = "macos")]
32+
use wry::application::platform::macos::WindowBuilderExtMacOS;
3133
#[cfg(all(feature = "system-tray", target_os = "macos"))]
3234
use wry::application::platform::macos::{SystemTrayBuilderExtMacOS, SystemTrayExtMacOS};
3335
#[cfg(target_os = "linux")]
@@ -906,8 +908,6 @@ impl WindowBuilder for WindowBuilderWrapper {
906908

907909
#[cfg(target_os = "macos")]
908910
fn parent_window(mut self, parent: *mut std::ffi::c_void) -> Self {
909-
use wry::application::platform::macos::WindowBuilderExtMacOS;
910-
911911
self.inner = self.inner.with_parent_window(parent);
912912
self
913913
}
@@ -2687,6 +2687,11 @@ fn create_webview<T: UserEvent>(
26872687
#[cfg(windows)]
26882688
let proxy = context.proxy.clone();
26892689

2690+
#[cfg(target_os = "macos")]
2691+
{
2692+
window_builder.inner = window_builder.inner.with_fullsize_content_view(true);
2693+
}
2694+
26902695
let is_window_transparent = window_builder.inner.window.transparent;
26912696
let menu_items = if let Some(menu) = window_builder.menu {
26922697
let mut menu_items = HashMap::new();

0 commit comments

Comments
 (0)