mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
reliably restore full-screen rdp window
This commit is contained in:
parent
2bfd021698
commit
b70db0aa53
1 changed files with 4 additions and 0 deletions
|
@ -1173,6 +1173,10 @@ namespace PersistentWindows.Common
|
||||||
bool isFullScreen = false;
|
bool isFullScreen = false;
|
||||||
if ((style & (long)WindowStyleFlags.MAXIMIZEBOX) == 0L)
|
if ((style & (long)WindowStyleFlags.MAXIMIZEBOX) == 0L)
|
||||||
{
|
{
|
||||||
|
// mstsc in full-screen mode may report inaccurate size such as 3858 x 2207 on 4k monitor
|
||||||
|
if (windowProcessName.ContainsKey(hwnd) && windowProcessName[hwnd] == "mstsc")
|
||||||
|
return true;
|
||||||
|
|
||||||
RECT screenPosition = new RECT();
|
RECT screenPosition = new RECT();
|
||||||
User32.GetWindowRect(hwnd, ref screenPosition);
|
User32.GetWindowRect(hwnd, ref screenPosition);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue