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);