mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
#400, fix wrong mismatch of dialog of different style
This commit is contained in:
parent
f66dc3afd8
commit
f05d569387
2 changed files with 14 additions and 0 deletions
|
@ -26,6 +26,8 @@ namespace PersistentWindows.Common.Models
|
|||
public bool IsFullScreen { get; set; }
|
||||
public bool IsMinimized { get; set; }
|
||||
public bool IsInvisible { get; set; }
|
||||
public long Style { get; set; }
|
||||
public long ExtStyle { get; set; }
|
||||
|
||||
// for restore window position to display session end time
|
||||
public DateTime CaptureTime { get; set; }
|
||||
|
|
|
@ -1496,6 +1496,9 @@ namespace PersistentWindows.Common
|
|||
DateTime last_killed_time = new DateTime(0);
|
||||
IntPtr last_killed_hid = IntPtr.Zero;
|
||||
|
||||
long style = User32.GetWindowLong(hwnd, User32.GWL_STYLE);
|
||||
long ext_style = User32.GetWindowLong(hwnd, User32.GWL_EXSTYLE);
|
||||
|
||||
var deadAppPos = deadApps[curDisplayKey];
|
||||
lock(captureLock)
|
||||
foreach (var kid in deadAppPos.Keys)
|
||||
|
@ -1505,6 +1508,11 @@ namespace PersistentWindows.Common
|
|||
if (!procName.Equals(appPos.ProcessName))
|
||||
continue;
|
||||
|
||||
if (appPos.Style != 0 && style != appPos.Style)
|
||||
continue;
|
||||
if (appPos.ExtStyle != 0 && ext_style != appPos.ExtStyle)
|
||||
continue;
|
||||
|
||||
if (!className.Equals(appPos.ClassName))
|
||||
{
|
||||
if (className.Length != appPos.ClassName.Length)
|
||||
|
@ -1513,6 +1521,7 @@ namespace PersistentWindows.Common
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (IsMinimized(hwnd) != appPos.IsMinimized)
|
||||
continue;
|
||||
if (User32.IsWindowVisible(hwnd) == appPos.IsInvisible)
|
||||
|
@ -3319,6 +3328,9 @@ namespace PersistentWindows.Common
|
|||
NeedUpdateWindowPlacement = false,
|
||||
ScreenPosition = screenPosition,
|
||||
|
||||
Style = User32.GetWindowLong(hwnd, User32.GWL_STYLE),
|
||||
ExtStyle = User32.GetWindowLong(hwnd, User32.GWL_EXSTYLE),
|
||||
|
||||
IsTopMost = IsWindowTopMost(hwnd),
|
||||
NeedClearTopMost = false,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue