mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
postpone capture to avoid wrong matching to killed window
This commit is contained in:
parent
e41caba220
commit
9224d62191
1 changed files with 4 additions and 0 deletions
|
@ -2683,6 +2683,10 @@ namespace PersistentWindows.Common
|
||||||
|
|
||||||
if (new_window)
|
if (new_window)
|
||||||
{
|
{
|
||||||
|
//if (windowProcessName[hWnd] == "mstsc" && curDisplayMetrics.IsMinimized && curDisplayMetrics.IsInvisible && !curDisplayMetrics.IsFullScreen)
|
||||||
|
if (curDisplayMetrics.IsMinimized && curDisplayMetrics.IsInvisible && !curDisplayMetrics.IsFullScreen)
|
||||||
|
return false; //postpone capture till window is visible
|
||||||
|
|
||||||
IntPtr kid = FindMatchingKilledWindow(hWnd);
|
IntPtr kid = FindMatchingKilledWindow(hWnd);
|
||||||
bool restore_last = TryInheritWindow(hWnd, curDisplayMetrics.HWnd, kid, curDisplayMetrics);
|
bool restore_last = TryInheritWindow(hWnd, curDisplayMetrics.HWnd, kid, curDisplayMetrics);
|
||||||
if (restore_last && prevDisplayMetrics != null && !restoringFromDB && IsResizableWindow(hWnd))
|
if (restore_last && prevDisplayMetrics != null && !restoringFromDB && IsResizableWindow(hWnd))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue