Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/win/drop_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ impl DropTarget {
};

unsafe {
let mut window = crate::Window::new(window_state.create_window());

let event = Event::Mouse(event);
let event_status =
window_state.handler_mut().as_mut().unwrap().on_event(&mut window, event);
let event_status = window_state.handle_event(event);

if let Some(pdwEffect) = pdwEffect {
match event_status {
Expand Down
5 changes: 3 additions & 2 deletions src/win/hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use windows_sys::Win32::{
},
};

use crate::win::wnd_proc;
use crate::win::BaseviewWindow;
use crate::wrappers::win32::window::wnd_proc;

// track all windows opened by this instance of baseview
// we use an RwLock here since the vast majority of uses (event interceptions)
Expand Down Expand Up @@ -128,7 +129,7 @@ unsafe fn offer_message_to_baseview(msg: *mut MSG) -> bool {

// check if this is one of our windows. if so, intercept it
if HOOK_STATE.read().unwrap().open_windows.contains(&HWNDWrapper(msg.hwnd)) {
let _ = wnd_proc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
let _ = wnd_proc::<BaseviewWindow>(msg.hwnd, msg.message, msg.wParam, msg.lParam);

return true;
}
Expand Down
Loading
Loading