1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-05 11:34:07 +02:00

Only activate mouse hook while cursor is over the notification window

This commit is contained in:
chylex 2019-10-07 04:49:39 +02:00
parent 1eb1f9848a
commit b988959eaa

View File

@ -166,7 +166,16 @@ private void timerDisplayDelay_Tick(object sender, EventArgs e){
}
private void timerHideProgress_Tick(object sender, EventArgs e){
if (Bounds.Contains(Cursor.Position) || FreezeTimer || ContextMenuOpen){
bool isCursorInside = Bounds.Contains(Cursor.Position);
if (isCursorInside){
StartMouseHook();
}
else{
StopMouseHook(false);
}
if (isCursorInside || FreezeTimer || ContextMenuOpen){
return;
}
@ -257,7 +266,6 @@ protected void PrepareAndDisplayWindow(){
}
MoveToVisibleLocation();
StartMouseHook();
}
protected virtual void OnNotificationReady(){