Skip to content

Commit

Permalink
fix: Account for window decorations when `accesskit_winit::Adapter::p…
Browse files Browse the repository at this point in the history
…rocess_event` receives a resizing event on Unix (#312)
  • Loading branch information
DataTriny authored Nov 5, 2023
1 parent 1930c72 commit e2b264c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platforms/winit/src/platform_impl/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ impl Adapter {
Rect::from_origin_size(inner_position, inner_size),
)
}
WindowEvent::Resized(outer_size) => {
WindowEvent::Resized(inner_size) => {
let outer_position: (_, _) = window
.outer_position()
.unwrap_or_default()
.cast::<f64>()
.into();
let outer_size: (_, _) = outer_size.cast::<f64>().into();
let outer_size: (_, _) = window.outer_size().cast::<f64>().into();
let inner_position: (_, _) = window
.inner_position()
.unwrap_or_default()
.cast::<f64>()
.into();
let inner_size: (_, _) = window.inner_size().cast::<f64>().into();
let inner_size: (_, _) = inner_size.cast::<f64>().into();
self.set_root_window_bounds(
Rect::from_origin_size(outer_position, outer_size),
Rect::from_origin_size(inner_position, inner_size),
Expand Down

0 comments on commit e2b264c

Please sign in to comment.