Desktop: Fix missing resize events causing all-gray window on Mac after launch (#3445)

* okayish solution

should be improved at some point but for now it works well enough.

* do leftover renames

* better solution

* less weird resize frames

* move surface reconfiguration

* fix recent desktop mac breakages

* better looking resize on mac

* fix background color

* Fix blank screen on window initialization

* cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Timon
2025-12-06 23:11:47 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 5b472a64b2
commit 2e4481880e
11 changed files with 129 additions and 66 deletions
+5 -5
View File
@@ -55,8 +55,8 @@ pub(crate) trait CefEventHandler: Send + Sync + 'static {
#[derive(Clone, Copy)]
pub(crate) struct ViewInfo {
width: usize,
height: usize,
width: u32,
height: u32,
scale: f64,
}
impl ViewInfo {
@@ -78,10 +78,10 @@ impl ViewInfo {
pub(crate) fn zoom(&self) -> f64 {
self.scale.ln() / 1.2_f64.ln()
}
pub(crate) fn width(&self) -> usize {
pub(crate) fn width(&self) -> u32 {
self.width
}
pub(crate) fn height(&self) -> usize {
pub(crate) fn height(&self) -> u32 {
self.height
}
}
@@ -92,7 +92,7 @@ impl Default for ViewInfo {
}
pub(crate) enum ViewInfoUpdate {
Size { width: usize, height: usize },
Size { width: u32, height: u32 },
Scale(f64),
}