From f9226c366eeae61dab0055781d8d26397f87444b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 23 Nov 2020 20:22:24 +0100 Subject: [PATCH] platform api unification: support Windows --- src/win/window.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win/window.rs b/src/win/window.rs index ae952be..1c89bb9 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -72,7 +72,7 @@ unsafe extern "system" fn wnd_proc( let win_ptr = GetWindowLongPtrA(hwnd, GWLP_USERDATA) as *const c_void; if !win_ptr.is_null() { let window_state = &*(win_ptr as *const RefCell>); - let mut window = Window { hwnd }; + let mut window = crate::window::Window(Window { hwnd }); match msg { WM_MOUSEMOVE => { @@ -177,7 +177,7 @@ impl WindowHandle { impl Window { pub fn open(options: WindowOpenOptions, build: B) -> WindowHandle where H: WindowHandler, - B: FnOnce(&mut Window) -> H, + B: FnOnce(&mut crate::window::Window) -> H, B: Send + 'static { unsafe { @@ -240,7 +240,7 @@ impl Window { ); // todo: manage error ^ - let mut window = Window { hwnd }; + let mut window = crate::window::Window(Window { hwnd }); let handler = build(&mut window);