mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-30 05:34:06 +02:00
Refactor -1 in hook to NativeMethods.HOOK_HANDLED & include example.html in project file
This commit is contained in:
parent
829d69485a
commit
6e262334ed
@ -98,7 +98,7 @@ private void StopMouseHook(){
|
|||||||
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
||||||
if (nCode == 0 && wParam.ToInt32() == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position)) && !ContainsFocus && !owner.ContainsFocus){
|
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);
|
browser.SendMouseWheelEvent(0, 0, 0, NativeMethods.GetHookWheelDelta(lParam), CefEventFlags.None);
|
||||||
return new IntPtr(-1);
|
return NativeMethods.HOOK_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NativeMethods.CallNextHookEx(mouseHook, nCode, wParam, lParam);
|
return NativeMethods.CallNextHookEx(mouseHook, nCode, wParam, lParam);
|
||||||
|
@ -9,6 +9,7 @@ namespace TweetDck.Core.Utils{
|
|||||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Local")]
|
[SuppressMessage("ReSharper", "MemberCanBePrivate.Local")]
|
||||||
static class NativeMethods{
|
static class NativeMethods{
|
||||||
public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF);
|
public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF);
|
||||||
|
public static readonly IntPtr HOOK_HANDLED = new IntPtr(-1);
|
||||||
|
|
||||||
public const int HWND_TOPMOST = -1;
|
public const int HWND_TOPMOST = -1;
|
||||||
public const uint SWP_NOACTIVATE = 0x0010;
|
public const uint SWP_NOACTIVATE = 0x0010;
|
||||||
|
@ -328,6 +328,7 @@
|
|||||||
<Content Include="Resources\Scripts\code.js" />
|
<Content Include="Resources\Scripts\code.js" />
|
||||||
<Content Include="Resources\Scripts\notification.js" />
|
<Content Include="Resources\Scripts\notification.js" />
|
||||||
<Content Include="Resources\Scripts\pages\error.html" />
|
<Content Include="Resources\Scripts\pages\error.html" />
|
||||||
|
<Content Include="Resources\Scripts\pages\example.html" />
|
||||||
<Content Include="Resources\Scripts\plugins.browser.js" />
|
<Content Include="Resources\Scripts\plugins.browser.js" />
|
||||||
<Content Include="Resources\Scripts\plugins.js" />
|
<Content Include="Resources\Scripts\plugins.js" />
|
||||||
<Content Include="Resources\Scripts\plugins.notification.js" />
|
<Content Include="Resources\Scripts\plugins.notification.js" />
|
||||||
|
Loading…
Reference in New Issue
Block a user