Skip to content

Commit

Permalink
Change DefWindowProcW calls to DefSubclassProc
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial committed Apr 2, 2018
1 parent 3873f15 commit f3103ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/platform/windows/events_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub unsafe extern "system" fn callback(
window_id: SuperWindowId(WindowId(window)),
event: Closed
});
winuser::DefWindowProcW(window, msg, wparam, lparam)
commctrl::DefSubclassProc(window, msg, wparam, lparam)
},
winuser::WM_DESTROY => {
Box::from_raw(subclass_input);
Expand Down Expand Up @@ -364,7 +364,7 @@ pub unsafe extern "system" fn callback(
use events::ElementState::Pressed;
use events::VirtualKeyCode;
if msg == winuser::WM_SYSKEYDOWN && wparam as i32 == winuser::VK_F4 {
winuser::DefWindowProcW(window, msg, wparam, lparam)
commctrl::DefSubclassProc(window, msg, wparam, lparam)
} else {
let (scancode, vkey) = event::vkeycode_to_element(wparam, lparam);
subclass_input.event_queue.borrow_mut().push_back(Event::WindowEvent {
Expand Down Expand Up @@ -561,7 +561,7 @@ pub unsafe extern "system" fn callback(

0
} else {
winuser::DefWindowProcW(window, msg, wparam, lparam)
commctrl::DefSubclassProc(window, msg, wparam, lparam)
}
},

Expand Down Expand Up @@ -612,7 +612,7 @@ pub unsafe extern "system" fn callback(
};

if call_def_window_proc {
winuser::DefWindowProcW(window, msg, wparam, lparam)
commctrl::DefSubclassProc(window, msg, wparam, lparam)
} else {
0
}
Expand Down Expand Up @@ -665,7 +665,7 @@ pub unsafe extern "system" fn callback(
},

_ => {
winuser::DefWindowProcW(window, msg, wparam, lparam)
commctrl::DefSubclassProc(window, msg, wparam, lparam)
}
}
}

0 comments on commit f3103ea

Please sign in to comment.