chore: remove platform WindowId's
WindowId is a window _identifier_, and as such doesn't store anything (unlike a _handle_). So we can safely make only be defined once, in the core crate. There are a few backends where we still use `into_raw` internally; I consider these patterns discouraged, we should not be passing around important state in the window id.
This commit is contained in:
parent
eccd9e415d
commit
da2268ae22
35 changed files with 226 additions and 379 deletions
|
|
@ -329,7 +329,7 @@ impl EventProcessor {
|
|||
F: Fn(&Arc<UnownedWindow>) -> Ret,
|
||||
{
|
||||
let mut deleted = false;
|
||||
let window_id = WindowId(window_id as _);
|
||||
let window_id = WindowId::from_raw(window_id as _);
|
||||
let result = self
|
||||
.target
|
||||
.windows
|
||||
|
|
@ -798,7 +798,7 @@ impl EventProcessor {
|
|||
|
||||
// In the event that the window's been destroyed without being dropped first, we
|
||||
// cleanup again here.
|
||||
self.target.windows.borrow_mut().remove(&WindowId(window as _));
|
||||
self.target.windows.borrow_mut().remove(&WindowId::from_raw(window as _));
|
||||
|
||||
// Since all XIM stuff needs to happen from the same thread, we destroy the input
|
||||
// context here instead of when dropping the window.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue