mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +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 IsFullScreen { get; set; }
|
||||||
public bool IsMinimized { get; set; }
|
public bool IsMinimized { get; set; }
|
||||||
public bool IsInvisible { 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
|
// for restore window position to display session end time
|
||||||
public DateTime CaptureTime { get; set; }
|
public DateTime CaptureTime { get; set; }
|
||||||
|
|
|
@ -1496,6 +1496,9 @@ namespace PersistentWindows.Common
|
||||||
DateTime last_killed_time = new DateTime(0);
|
DateTime last_killed_time = new DateTime(0);
|
||||||
IntPtr last_killed_hid = IntPtr.Zero;
|
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];
|
var deadAppPos = deadApps[curDisplayKey];
|
||||||
lock(captureLock)
|
lock(captureLock)
|
||||||
foreach (var kid in deadAppPos.Keys)
|
foreach (var kid in deadAppPos.Keys)
|
||||||
|
@ -1505,6 +1508,11 @@ namespace PersistentWindows.Common
|
||||||
if (!procName.Equals(appPos.ProcessName))
|
if (!procName.Equals(appPos.ProcessName))
|
||||||
continue;
|
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.Equals(appPos.ClassName))
|
||||||
{
|
{
|
||||||
if (className.Length != appPos.ClassName.Length)
|
if (className.Length != appPos.ClassName.Length)
|
||||||
|
@ -1513,6 +1521,7 @@ namespace PersistentWindows.Common
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (IsMinimized(hwnd) != appPos.IsMinimized)
|
if (IsMinimized(hwnd) != appPos.IsMinimized)
|
||||||
continue;
|
continue;
|
||||||
if (User32.IsWindowVisible(hwnd) == appPos.IsInvisible)
|
if (User32.IsWindowVisible(hwnd) == appPos.IsInvisible)
|
||||||
|
@ -3319,6 +3328,9 @@ namespace PersistentWindows.Common
|
||||||
NeedUpdateWindowPlacement = false,
|
NeedUpdateWindowPlacement = false,
|
||||||
ScreenPosition = screenPosition,
|
ScreenPosition = screenPosition,
|
||||||
|
|
||||||
|
Style = User32.GetWindowLong(hwnd, User32.GWL_STYLE),
|
||||||
|
ExtStyle = User32.GetWindowLong(hwnd, User32.GWL_EXSTYLE),
|
||||||
|
|
||||||
IsTopMost = IsWindowTopMost(hwnd),
|
IsTopMost = IsWindowTopMost(hwnd),
|
||||||
NeedClearTopMost = false,
|
NeedClearTopMost = false,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue