mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
Implement focus events for win32
This commit is contained in:
@@ -395,6 +395,18 @@ extern "stdcall" fn callback(window: ffi::HWND, msg: ffi::UINT,
|
||||
0
|
||||
},
|
||||
|
||||
ffi::WM_SETFOCUS => {
|
||||
use events::Focused;
|
||||
send_event(window, Focused(true));
|
||||
0
|
||||
},
|
||||
|
||||
ffi::WM_KILLFOCUS => {
|
||||
use events::Focused;
|
||||
send_event(window, Focused(false));
|
||||
0
|
||||
},
|
||||
|
||||
_ => unsafe {
|
||||
ffi::DefWindowProcW(window, msg, wparam, lparam)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user