-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(wm): remove mutability from window and events
We had a mut requirement on some of the Window functions which may have been vestigial or in preparation for more state on Window objects, but presently unused. I removed that, as the Window struct is currently just carrying an HWND value that's essentially always immutable - there's no advantage to ever reusing a Window struct vs. making a new one for another HWND. In doing so we then no longer needed to be passing in mutable events, so I applied a little simplification of the event receiver / dispatcher to process_event. After that it became obvious that we could just pass the owned event directly into process_event instead, which substantially simplifies the ownership model and lifetime for those objects. This is small, and shouldn't create any meaningful behavioral change.
- Loading branch information
Showing
2 changed files
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters