mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
refix delay activating webpage commander window when curosr is beam (user might be typing)
This commit is contained in:
parent
40f8f5cefd
commit
052cb05f53
1 changed files with 14 additions and 4 deletions
|
@ -37,6 +37,7 @@ namespace PersistentWindows.Common
|
||||||
private static POINT lastCursorPos;
|
private static POINT lastCursorPos;
|
||||||
private POINT lastWheelCursorPos;
|
private POINT lastWheelCursorPos;
|
||||||
private bool handCursor = false;
|
private bool handCursor = false;
|
||||||
|
private bool ibeamCursor = false;
|
||||||
private int titleHeight;
|
private int titleHeight;
|
||||||
private Color dfltBackColor;
|
private Color dfltBackColor;
|
||||||
private bool promptZkey = true;
|
private bool promptZkey = true;
|
||||||
|
@ -869,6 +870,7 @@ namespace PersistentWindows.Common
|
||||||
}
|
}
|
||||||
else if (Math.Abs(cursorPos.X - lastCursorPos.X) > 3 || Math.Abs(cursorPos.Y - lastCursorPos.Y) > 3)
|
else if (Math.Abs(cursorPos.X - lastCursorPos.X) > 3 || Math.Abs(cursorPos.Y - lastCursorPos.Y) > 3)
|
||||||
{
|
{
|
||||||
|
ibeamCursor = false;
|
||||||
//mouse moving, continue monitor
|
//mouse moving, continue monitor
|
||||||
totalWaitSecondsForWhiteColor = 0;
|
totalWaitSecondsForWhiteColor = 0;
|
||||||
}
|
}
|
||||||
|
@ -906,15 +908,14 @@ namespace PersistentWindows.Common
|
||||||
}
|
}
|
||||||
else if (hCursor == Cursors.IBeam.Handle)
|
else if (hCursor == Cursors.IBeam.Handle)
|
||||||
{
|
{
|
||||||
|
ibeamCursor = true;
|
||||||
Visible = false;
|
Visible = false;
|
||||||
if (Math.Abs(cursorPos.X - lastCursorPos.X) < 3 && Math.Abs(cursorPos.Y - lastCursorPos.Y) < 3)
|
StartAliveTimer(11, 1000);
|
||||||
StartAliveTimer(11, 2000);
|
|
||||||
else
|
|
||||||
StartAliveTimer(11, 1000);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (hCursor == Cursors.Cross.Handle || handCursor)
|
else if (hCursor == Cursors.Cross.Handle || handCursor)
|
||||||
{
|
{
|
||||||
|
ibeamCursor = false;
|
||||||
StartAliveTimer(7);
|
StartAliveTimer(7);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -949,6 +950,14 @@ namespace PersistentWindows.Common
|
||||||
regain_focus = false;
|
regain_focus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ibeamCursor && hCursor == Cursors.Default.Handle)
|
||||||
|
//&& Math.Abs(cursorPos.X - lastCursorPos.X) < 3 && Math.Abs(cursorPos.Y - lastCursorPos.Y) < 3)
|
||||||
|
{
|
||||||
|
ibeamCursor = false;
|
||||||
|
StartAliveTimer(11, 1000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// let tiny hotkey window follow cursor position
|
// let tiny hotkey window follow cursor position
|
||||||
ResetHotKeyVirtualDesktop();
|
ResetHotKeyVirtualDesktop();
|
||||||
ResetHotkeyWindowPos();
|
ResetHotkeyWindowPos();
|
||||||
|
@ -971,6 +980,7 @@ namespace PersistentWindows.Common
|
||||||
// hand cursor shape
|
// hand cursor shape
|
||||||
if (!handCursor)
|
if (!handCursor)
|
||||||
{
|
{
|
||||||
|
ibeamCursor = false;
|
||||||
handCursor = true;
|
handCursor = true;
|
||||||
Left -= 10;
|
Left -= 10;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue