mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 23:34:06 +02:00
Update mouse hook to respect nCode value and also to stop further processing
This commit is contained in:
parent
27c2aee8b9
commit
63a1928468
@ -95,9 +95,10 @@ private void StopMouseHook(){
|
||||
}
|
||||
}
|
||||
|
||||
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
||||
if (wParam.ToInt32() == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position)) && !ContainsFocus && !owner.ContainsFocus){
|
||||
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){ System.Diagnostics.Debug.WriteLine(nCode);
|
||||
if (nCode == 0 && wParam.ToInt32() == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position)) && !ContainsFocus && !owner.ContainsFocus){
|
||||
browser.SendMouseWheelEvent(0, 0, 0, NativeMethods.GetHookWheelDelta(lParam), CefEventFlags.None);
|
||||
return new IntPtr(-1);
|
||||
}
|
||||
|
||||
return NativeMethods.CallNextHookEx(mouseHook, nCode, wParam, lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user