mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 05:25:37 +02:00
hide webpage commander window during mouse move, reduce flicker when unhide
This commit is contained in:
parent
2b36e580b9
commit
b8a03dd189
1 changed files with 6 additions and 2 deletions
|
@ -825,6 +825,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)
|
||||||
{
|
{
|
||||||
//mouse moving, continue monitor
|
//mouse moving, continue monitor
|
||||||
|
Visible = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -862,9 +863,10 @@ namespace PersistentWindows.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
bool regain_focus = true;
|
bool regain_focus = true;
|
||||||
|
bool change_to_visible = false;
|
||||||
if (!Visible)
|
if (!Visible)
|
||||||
{
|
{
|
||||||
Visible = true;
|
change_to_visible = true;
|
||||||
TopMost = true;
|
TopMost = true;
|
||||||
if (defocused)
|
if (defocused)
|
||||||
{
|
{
|
||||||
|
@ -886,12 +888,14 @@ namespace PersistentWindows.Common
|
||||||
|
|
||||||
// let tiny hotkey window follow cursor position
|
// let tiny hotkey window follow cursor position
|
||||||
ResetHotKeyVirtualDesktop();
|
ResetHotKeyVirtualDesktop();
|
||||||
|
ResetHotkeyWindowPos();
|
||||||
|
if (change_to_visible)
|
||||||
|
Visible = true;
|
||||||
if (regain_focus)
|
if (regain_focus)
|
||||||
{
|
{
|
||||||
User32.SetForegroundWindow(Handle);
|
User32.SetForegroundWindow(Handle);
|
||||||
User32.SetFocus(Handle);
|
User32.SetFocus(Handle);
|
||||||
}
|
}
|
||||||
ResetHotkeyWindowPos();
|
|
||||||
|
|
||||||
if (hCursor == Cursors.Default.Handle)
|
if (hCursor == Cursors.Default.Handle)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue