Skip to content

Commit

Permalink
fix: rendering issue when resizing with devtools open closes #3914 #3814
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Apr 19, 2022
1 parent 485c974 commit 80b714a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-resize-with-devtools.md
@@ -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
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

0 comments on commit 80b714a

Please sign in to comment.