mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
unlock unknown display session when any window is moved/resized/minimize/unminimized
This commit is contained in:
parent
4330c95216
commit
05a740a21f
1 changed files with 18 additions and 0 deletions
|
@ -2120,6 +2120,12 @@ namespace PersistentWindows.Common
|
|||
break;
|
||||
|
||||
case User32Events.EVENT_SYSTEM_MOVESIZESTART:
|
||||
if (freezeCapture)
|
||||
{
|
||||
Log.Event($"recognize {curDisplayKey} as user session");
|
||||
freezeCapture = false; //unlock unknown display session as normal
|
||||
}
|
||||
|
||||
if ((User32.GetKeyState(0x11) & 0x8000) != 0 //ctrl key pressed
|
||||
&& (User32.GetKeyState(0x10) & 0x8000) != 0) //shift key pressed
|
||||
{
|
||||
|
@ -2133,6 +2139,12 @@ namespace PersistentWindows.Common
|
|||
lastUnminimizeWindow = hwnd;
|
||||
tidyTabWindows.Remove(hwnd); //no longer hidden by tidytab
|
||||
|
||||
if (freezeCapture)
|
||||
{
|
||||
Log.Event($"recognize {curDisplayKey} as user session");
|
||||
freezeCapture = false; //unlock unknown display session as normal
|
||||
}
|
||||
|
||||
if (monitorApplications.ContainsKey(curDisplayKey) && monitorApplications[curDisplayKey].ContainsKey(hwnd))
|
||||
{
|
||||
//treat unminimized window as foreground
|
||||
|
@ -2161,6 +2173,12 @@ namespace PersistentWindows.Common
|
|||
if (enableMinimizeToTray)
|
||||
MinimizeToTray.Create(hwnd);
|
||||
|
||||
if (freezeCapture)
|
||||
{
|
||||
Log.Event($"recognize {curDisplayKey} as user session");
|
||||
freezeCapture = false; //unlock unknown display session as normal
|
||||
}
|
||||
|
||||
goto case User32Events.EVENT_SYSTEM_MOVESIZEEND;
|
||||
case User32Events.EVENT_SYSTEM_MOVESIZEEND:
|
||||
if (eventType == User32Events.EVENT_SYSTEM_MOVESIZEEND)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue