Skip to content

Commit

Permalink
Post WM_MOUSELEAVE after WM_MOUSEMOVE when cleaning up the notificati…
Browse files Browse the repository at this point in the history
…on area

This may be a fix for #350 and #426. If not enough, another solution could be to
disable the tooltip for a limited amount of time (attach to PreviewTrayToolTipOpen,
check for the last cleanup time in the delegate, set e.Handled if too early).
  • Loading branch information
samhocevar committed Sep 2, 2021
1 parent 10eca5d commit c7e95ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/wincompose/interop/WinTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ internal enum WM : int
SYSKEYDOWN = 0x104,
SYSKEYUP = 0x105,
MOUSEMOVE = 0x200,
MOUSELEAVE = 0x2A3,
};

public enum VK : int
Expand Down
1 change: 1 addition & 0 deletions src/wincompose/ui/NotificationIcon.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ private void CleanupNotificationArea()
for (int y = rect.Top + 4; y < rect.Bottom; y += 8)
for (int x = rect.Left + 4; x < rect.Right; x += 8)
NativeMethods.PostMessage(area, (uint)WM.MOUSEMOVE, 0, (y << 16) | x);
NativeMethods.PostMessage(area, (uint)WM.MOUSELEAVE, 0, 0);
}
}

Expand Down

0 comments on commit c7e95ac

Please sign in to comment.