aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32/mod.rs
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 19:45:29 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 19:45:29 +0200
commit7a8e7a792272fd0d6775db1f8efe196406a50438 (patch)
treebce940a1c25b7bae263cdfa78385fe66adeba211 /src/win32/mod.rs
parent0103fb833eae3eceb27992ce897ca9a16395b048 (diff)
downloadglutin-7a8e7a792272fd0d6775db1f8efe196406a50438.tar.gz
glutin-7a8e7a792272fd0d6775db1f8efe196406a50438.zip
Implement focus events for win32
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r--src/win32/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index d5a0820..959e141 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -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)
}