mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +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;
|
break;
|
||||||
|
|
||||||
case User32Events.EVENT_SYSTEM_MOVESIZESTART:
|
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
|
if ((User32.GetKeyState(0x11) & 0x8000) != 0 //ctrl key pressed
|
||||||
&& (User32.GetKeyState(0x10) & 0x8000) != 0) //shift key pressed
|
&& (User32.GetKeyState(0x10) & 0x8000) != 0) //shift key pressed
|
||||||
{
|
{
|
||||||
|
@ -2133,6 +2139,12 @@ namespace PersistentWindows.Common
|
||||||
lastUnminimizeWindow = hwnd;
|
lastUnminimizeWindow = hwnd;
|
||||||
tidyTabWindows.Remove(hwnd); //no longer hidden by tidytab
|
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))
|
if (monitorApplications.ContainsKey(curDisplayKey) && monitorApplications[curDisplayKey].ContainsKey(hwnd))
|
||||||
{
|
{
|
||||||
//treat unminimized window as foreground
|
//treat unminimized window as foreground
|
||||||
|
@ -2161,6 +2173,12 @@ namespace PersistentWindows.Common
|
||||||
if (enableMinimizeToTray)
|
if (enableMinimizeToTray)
|
||||||
MinimizeToTray.Create(hwnd);
|
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;
|
goto case User32Events.EVENT_SYSTEM_MOVESIZEEND;
|
||||||
case User32Events.EVENT_SYSTEM_MOVESIZEEND:
|
case User32Events.EVENT_SYSTEM_MOVESIZEEND:
|
||||||
if (eventType == User32Events.EVENT_SYSTEM_MOVESIZEEND)
|
if (eventType == User32Events.EVENT_SYSTEM_MOVESIZEEND)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue