Skip to content

Commit

Permalink
Cleanup bevy winit (bevyengine#11489)
Browse files Browse the repository at this point in the history
# Objective

Get bevyengine#11257 changes merged.

I rewrote them one by one checking each to ensure correctness. In
particular, the window rescale logic changes to accomodate mut app
access are double checked. Not all changes have been included as some of
bevy_winit has since changed, and i am not confident including them.
Namely, the `run_app_update_if_should` change.

### Notes to reviewers

Review commits individually, use the "Hide whitespaces" diff display
mode.

## Changelog

* `bevy::window::WindowMoved`'s `entity` field has been renamed to
`window`


## Migration Guide

`bevy::window::WindowMoved`'s `entity` field has been renamed to
`window`. This is to be more consistent with other windowing events.

Consider changing usage:

```diff
-window_moved.entity
+window_moved.window
```

---------

Co-authored-by: François <mockersf@gmail.com>
  • Loading branch information
2 people authored and tjamaan committed Feb 6, 2024
1 parent 5fc3e31 commit ca73478
Show file tree
Hide file tree
Showing 3 changed files with 433 additions and 624 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_window/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ pub enum FileDragAndDrop {
)]
pub struct WindowMoved {
/// Window that moved.
pub entity: Entity,
pub window: Entity,
/// Where the window moved to in physical pixels.
pub position: IVec2,
}
Expand Down
Loading

0 comments on commit ca73478

Please sign in to comment.