[GH-ISSUE #280] RDP do not auto resizing after login & Remember Position and Size of RDP Window #246

Closed
opened 2026-02-26 11:57:23 +03:00 by kerem · 13 comments
Owner

Originally created by @MWinhard on GitHub (Aug 20, 2022).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/280

Originally assigned to: @VShawn on GitHub.

When I open the first RDP session, the new window always comes up in the middle of the screen. Each time I have to use the mouse, drag the window to the upper left corner, then make it high enough to get rid of the scrollbars.

Wouldn't it be nice if this window came up at the position and size where I closed it last time?

Originally created by @MWinhard on GitHub (Aug 20, 2022). Original GitHub issue: https://github.com/1Remote/1Remote/issues/280 Originally assigned to: @VShawn on GitHub. When I open the first RDP session, the new window always comes up in the middle of the screen. Each time I have to use the mouse, drag the window to the upper left corner, then make it high enough to get rid of the scrollbars. Wouldn't it be nice if this window came up at the position and size where I closed it last time?
kerem 2026-02-26 11:57:23 +03:00
Author
Owner

@VShawn commented on GitHub (Aug 23, 2022):

drag the window to the upper left corner

Is this for maximize the window?

I do record the window size of the last tab window.

image

So if you

  1. open a tab window and maximize it.
  2. close all tab window
  3. reopen a new remote session
  4. you will get a new maximize window without any drag/drop adjustment.
  5. I think the new window would be high enough for your scrollbar.

But in your case, you said you have to drag window every time? This mean the saved window size isn't work for you. Please check the Locality.json file and see if the window size be changed each time you adjust the window.

<!-- gh-comment-id:1223415673 --> @VShawn commented on GitHub (Aug 23, 2022): > drag the window to the upper left corner Is this for maximize the window? I do record the window size of the last tab window. ![image](https://user-images.githubusercontent.com/10143738/186049724-beb301e7-3fc1-4c63-82ca-5e418563944f.png) So if you 1. open a tab window and maximize it. 2. close all tab window 3. reopen a new remote session 4. you will get a new maximize window without any drag/drop adjustment. 5. I think the new window would be high enough for your scrollbar. But in your case, you said you have to drag window every time? This mean the saved window size isn't work for you. Please check the `Locality.json` file and see if the window size be changed each time you adjust the window.
Author
Owner

@MWinhard commented on GitHub (Aug 25, 2022):

Hi Shawn,

sorry for the late reply. I had to find a free (and working) screen
recording software first. ;-)

1. My tab window isn't maximized:
I've made a little video that shows what I do.
[url removed]

2. Some of my Windows 10 settings may be unusual:

  • Resolution: 3840 x 2160 (4k)
  • Change the size of text, apps and other items: 225% (desktop zoom factor)
  • Taskbar location on screen = Top
  • Use small taskbar buttons = On

3. Locality.json:
TabWindowHeight changes when I change the tab window's height. If you
multiply TabWindowWidth and TabWindowHeight with 2.25 (my desktop zoom
factor) this looks more or less correct. This is the recorded size after
positioning, resizing and closing the tab window;

{
  "MainWindowWidth": 970.2222222222222,
  "MainWindowHeight": 616.8888888888888,
  "TabWindowWidth": 1157.7777777777776,
  "TabWindowHeight": 929.7777777777777,
  "TabWindowState": 0,
  "ServerOrderBy": -1,
  "RdpLocalitys": {
    "1": {
      "LastUpdateTime": "2022-08-11T15:28:55.6218361+02:00",
      "FullScreenLastSessionIsFullScreen": false,
      "FullScreenLastSessionScreenIndex": -1
    }
  }
}

4. RDP connection settings:

5. Additional thoughts:
a) Locality.json has no TabWindowLeft and TabWindowTop settings. How can
you decide where to show the tab window next time?

b) Do you calculate the available desktop height and width? What happens
when you decide that the tab window is bigger than desktop size?

c) Windows 10 tends to dock a window at top and bottom when you resize
window height to it's fullest, like I do. Maybe WPF doesn't report the
window's correct height in this special scenario?

Thank you very much in advance!

Markus Winhard

-------- Original Message --------
Subject: Re: [1Remote/PRemoteM] Remember Position and Size of RDP Window
(Issue #280)
From: VShawn @.>
To: 1Remote/PRemoteM @.
>
Cc: Markus Winhard @.>, Author @.>
Date: Dienstag, 23.08.2022 03:42:23

drag the window to the upper left corner

Is this for maximize the window?

I do record the window size of the last tab window.

image
https://user-images.githubusercontent.com/10143738/186049724-beb301e7-3fc1-4c63-82ca-5e418563944f.png

So if you

  1. open a tab window and maximize it.
  2. close all tab window
  3. reopen a new remote session
  4. you will get a new maximize window without any drag/drop adjustment.
  5. I think the new window would be high enough for your scrollbar.

But in your case, you said you have to drag window every time? This
mean the saved window size isn't work for you. Please check the
|Locality.json| file and see if the window size be changed each time
you adjust the window.


Reply to this email directly, view it on GitHub
https://github.com/1Remote/PRemoteM/issues/280#issuecomment-1223415673,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2TZPX6ZEBQ2NSV5D55DBVTV2QT77ANCNFSM57DJWIFA.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:1226958877 --> @MWinhard commented on GitHub (Aug 25, 2022): Hi Shawn, sorry for the late reply. I had to find a free (and working) screen recording software first. ;-) *_1. My tab window isn't maximized:_* I've made a little video that shows what I do. [url removed] *_2. Some of my Windows 10 settings may be unusual:_* - Resolution: 3840 x 2160 (4k) - Change the size of text, apps and other items: 225% (desktop zoom factor) - Taskbar location on screen = Top - Use small taskbar buttons = On *_3. Locality.json:_* TabWindowHeight changes when I change the tab window's height. If you multiply TabWindowWidth and TabWindowHeight with 2.25 (my desktop zoom factor) this looks more or less correct. This is the recorded size after positioning, resizing and closing the tab window; {   "MainWindowWidth": 970.2222222222222,   "MainWindowHeight": 616.8888888888888,   "TabWindowWidth": 1157.7777777777776,   "TabWindowHeight": 929.7777777777777,   "TabWindowState": 0,   "ServerOrderBy": -1,   "RdpLocalitys": {     "1": {       "LastUpdateTime": "2022-08-11T15:28:55.6218361+02:00",       "FullScreenLastSessionIsFullScreen": false,       "FullScreenLastSessionScreenIndex": -1     }   } } *_4. RDP connection settings:_* *_5. Additional thoughts:_* a) Locality.json has no TabWindowLeft and TabWindowTop settings. How can you decide where to show the tab window next time? b) Do you calculate the available desktop height and width? What happens when you decide that the tab window is bigger than desktop size? c) Windows 10 tends to dock a window at top and bottom when you resize window height to it's fullest, like I do. Maybe WPF doesn't report the window's correct height in this special scenario? Thank you very much in advance! Markus Winhard -------- Original Message -------- Subject: Re: [1Remote/PRemoteM] Remember Position and Size of RDP Window (Issue #280) From: VShawn ***@***.***> To: 1Remote/PRemoteM ***@***.***> Cc: Markus Winhard ***@***.***>, Author ***@***.***> Date: Dienstag, 23.08.2022 03:42:23 > > drag the window to the upper left corner > > Is this for maximize the window? > > I do record the window size of the last tab window. > > image > <https://user-images.githubusercontent.com/10143738/186049724-beb301e7-3fc1-4c63-82ca-5e418563944f.png> > > So if you > > 1. open a tab window and maximize it. > 2. close all tab window > 3. reopen a new remote session > 4. you will get a new maximize window without any drag/drop adjustment. > 5. I think the new window would be high enough for your scrollbar. > > But in your case, you said you have to drag window every time? This > mean the saved window size isn't work for you. Please check the > |Locality.json| file and see if the window size be changed each time > you adjust the window. > > — > Reply to this email directly, view it on GitHub > <https://github.com/1Remote/PRemoteM/issues/280#issuecomment-1223415673>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2TZPX6ZEBQ2NSV5D55DBVTV2QT77ANCNFSM57DJWIFA>. > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@VShawn commented on GitHub (Aug 25, 2022):

Thanks for your screen record (BTW, I recommend you the ScreenToGif:
https://github.com/NickeManarin/ScreenToGif)

From your record, The auto resizing does not work after login completes.
That's the reason why you got a scroll bar. And Remember Position and Size would not help you solve the problem.

Here is how the auto resizing work on me:

See? None of the scroll bars exist.

I try to set the 225% desktop zoom factor, but unfortunately I can not
reproduce the problem still.

Then I wanna you to help check the resize info in your log (Especially the
highlighted content), to see if the zooming factor is correct.

My log looks like this:
image

<!-- gh-comment-id:1227340000 --> @VShawn commented on GitHub (Aug 25, 2022): Thanks for your screen record (BTW, I recommend you the ScreenToGif: https://github.com/NickeManarin/ScreenToGif) From your record, The auto resizing does not work after login completes. That's the reason why you got a scroll bar. And `Remember Position and Size` would not help you solve the problem. Here is how the auto resizing work on me: ![](https://user-images.githubusercontent.com/10143738/186692686-a984af2c-54ff-4ffe-9639-dd6287ee19a6.gif) See? None of the scroll bars exist. I try to set the 225% desktop zoom factor, but unfortunately I can not reproduce the problem still. Then I wanna you to help check the resize info in your log (Especially the highlighted content), to see if the zooming factor is correct. My log looks like this: ![image](https://user-images.githubusercontent.com/10143738/186692763-a5c432eb-0076-464f-99ec-2e95948481df.png)
Author
Owner

@VShawn commented on GitHub (Aug 25, 2022):

Locality.json has no TabWindowLeft and TabWindowTop settings. How can you decide where to show the tab window next time?

That's my fault, I misremember, PRemoteM did not remember the left and top properties. I will catch up on this latter.

Do you calculate the available desktop height and width? What happens when you decide that the tab window is bigger than desktop size?

Yes I calculated it, and it works fine with my 4k + 225% + top taskbar environment. For now, I can't tell why it not work on your desk. That's why I asked you for more log information to help :)

<!-- gh-comment-id:1227354665 --> @VShawn commented on GitHub (Aug 25, 2022): > Locality.json has no TabWindowLeft and TabWindowTop settings. How can you decide where to show the tab window next time? That's my fault, I misremember, PRemoteM did not remember the left and top properties. I will catch up on this latter. > Do you calculate the available desktop height and width? What happens when you decide that the tab window is bigger than desktop size? Yes I calculated it, and it works fine with my 4k + 225% + top taskbar environment. For now, I can't tell why it not work on your desk. That's why I asked you for more log information to help :)
Author
Owner

@MWinhard commented on GitHub (Aug 25, 2022):

Unfortunately the images are missing. Can you send them as attachments?

Markus

-------- Original Message --------
Subject: Re: [1Remote/PRemoteM] Remember Position and Size of RDP Window
(Issue #280)
From: VShawn @.>
To: 1Remote/PRemoteM @.
>
Cc: Markus Winhard @.>, Author @.>
Date: Donnerstag, 25.08.2022 16:29:56

Thanks for your screen record (BTW, I recommend you the ScreenToGif:
https://github.com/NickeManarin/ScreenToGif)

From your record, The auto resizing does not work after login completes.
That's the reason why you got a scroll bar. And Remember Position and Size would not help you solve the problem.

Here is how the auto resizing work on me:
[image: 1.gif]

See? None of the scroll bars exist.

I try to set the 225% desktop zoom factor, but unfortunately I can not
reproduce the problem still.

[image: image.png]

Then I wanna you to help check the resize info in your log (Especially the
highlighted content)

My log looks like this:
[image: image.png]

Message ID: @.***>


Reply to this email directly, view it on GitHub
https://github.com/1Remote/PRemoteM/issues/280#issuecomment-1227340000,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2TZPX2PK4OPGBBKXV6Y3WDV257OJANCNFSM57DJWIFA.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:1227377546 --> @MWinhard commented on GitHub (Aug 25, 2022): Unfortunately the images are missing. Can you send them as attachments? Markus -------- Original Message -------- Subject: Re: [1Remote/PRemoteM] Remember Position and Size of RDP Window (Issue #280) From: VShawn ***@***.***> To: 1Remote/PRemoteM ***@***.***> Cc: Markus Winhard ***@***.***>, Author ***@***.***> Date: Donnerstag, 25.08.2022 16:29:56 > Thanks for your screen record (BTW, I recommend you the ScreenToGif: > https://github.com/NickeManarin/ScreenToGif) > > >From your record, The auto resizing does not work after login completes. > That's the reason why you got a scroll bar. And `Remember Position and > Size` would not help you solve the problem. > > Here is how the auto resizing work on me: > [image: 1.gif] > > See? None of the scroll bars exist. > > I try to set the 225% desktop zoom factor, but unfortunately I can not > reproduce the problem still. > > [image: image.png] > > Then I wanna you to help check the resize info in your log (Especially the > highlighted content) > > My log looks like this: > [image: image.png] > > > Message ID: ***@***.***> > > > > — > Reply to this email directly, view it on GitHub > <https://github.com/1Remote/PRemoteM/issues/280#issuecomment-1227340000>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2TZPX2PK4OPGBBKXV6Y3WDV257OJANCNFSM57DJWIFA>. > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@VShawn commented on GitHub (Aug 25, 2022):

Hi, You can get them on GitHub issues page https://github.com/1Remote/PRemoteM/issues/280 , it seems the GitHub mail proxy blocking the pictures.

BTW, I dont know your email address, I reply to the notifications@github.com

<!-- gh-comment-id:1227434725 --> @VShawn commented on GitHub (Aug 25, 2022): Hi, You can get them on GitHub issues page https://github.com/1Remote/PRemoteM/issues/280 , it seems the GitHub mail proxy blocking the pictures. BTW, I dont know your email address, I reply to the notifications@github.com
Author
Owner

@MWinhard commented on GitHub (Aug 25, 2022):

Hi Shawn,

please see the attached log. It's recorded from double-click till the
tab window is shown.

Looks like your screen size is not 4k and your tab window size is
smaller than mine:
Yours:
RDP Host: init Display with ScaleFactor = 225, W = 841, H = 594
RDP Host: Display init end: RDP.DesktopWidth = 1892, RDP.DesktopWidth =
1892,
Mine:
RDP Host: init Display with ScaleFactor = 225, W = 1153, H = 709
RDP Host: Display init end: RDP.DesktopWidth = 2592, RDP.DesktopWidth =
2592,

This line is comlete missing in my log:
RDP resize to: W = 1892, H = 1336, ScaleFactor = 225

I have a warning in my log:
[ProtocolRunnerHostHelper.cs(GetRunner:32)]    we don't have a protocol
named: RDP

Do you intentionally log RDP.DesktopWidth twice in one line?

HTH,

Markus

[T:001][19:36:34.903] Debug SetSelfStartingHelper.SetSelfStartByRegistryKey(True, "PRemoteM")

[T:001][19:36:34.912] Warning [ProtocolRunnerHostHelper.cs(GetRunner:32)] we don't have a protocol named: RDP

[T:001][19:36:34.913] Debug CloseEmptyWindows: closing tab(57223682)

[T:001][19:36:34.913] Info CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 1

[T:001][19:36:34.914] Warning [SessionControlService.cs(ConnectWithTab:208)] CloseEmptyWindows: 1 Empty Host closed

[T:001][19:36:34.914] Debug Closing: 1 Empty Host.

[T:001][19:36:34.918] Info CloseMarkedProtocolHost: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0

[T:001][19:36:34.919] Debug Disposing AxMsRdpClient09Host(32772220)

[T:001][19:36:34.957] Debug RDP Host: _rdpClient.Dispose()

[T:001][19:36:34.958] Debug Dispose done AxMsRdpClient09Host(32772220)

[T:001][19:36:35.039] Debug AxMsRdpClient09Host: Status => Initializing

[T:001][19:36:35.040] Debug RDP Host: _rdpClient.Dispose()

[T:001][19:36:35.041] Debug RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx()

[T:001][19:36:35.042] Debug RDP Host: init CreateControl();

[T:001][19:36:35.058] Debug RDP Host: init Static

[T:001][19:36:35.059] Debug RDP Host: init conn bar

[T:001][19:36:35.060] Debug RDP Host: init Redirect

[T:001][19:36:35.062] Debug RDP Host: init Display with ScaleFactor = 225, W = 1153, H = 709

[T:001][19:36:35.063] Debug RDP Host: Display init end: RDP.DesktopWidth = 2592, RDP.DesktopWidth = 2592,

[T:001][19:36:35.064] Debug RDP Host: init Performance

[T:001][19:36:35.065] Debug RdpInit: DisplayPerformance = Auto, flag = 0

[T:001][19:36:35.065] Debug RDP Host: init Gateway

[T:001][19:36:35.066] Debug AxMsRdpClient09Host: Status => Initialized

[T:001][19:36:35.070] Debug AxMsRdpClient09Host: Status => Connecting

[T:001][19:36:35.152] Info ShowRemoteHost: Current: Host = 1, Full = 0, Tab = 1, HostToBeDispose = 0, WindowToBeDispose = 0

[T:001][19:36:35.919] Debug RDP Host: RdpOnOnConnected

[T:001][19:36:35.920] Debug AxMsRdpClient09Host: Status => Connected

[T:001][19:36:36.583] Debug RDP Host: RdpOnOnLoginComplete

<!-- gh-comment-id:1227575956 --> @MWinhard commented on GitHub (Aug 25, 2022): Hi Shawn, please see the attached log. It's recorded from double-click till the tab window is shown. Looks like your screen size is not 4k and your tab window size is smaller than mine: Yours: RDP Host: init Display with ScaleFactor = 225, W = 841, H = 594 RDP Host: Display init end: RDP.DesktopWidth = 1892, RDP.DesktopWidth = 1892, Mine: RDP Host: init Display with ScaleFactor = 225, W = 1153, H = 709 RDP Host: Display init end: RDP.DesktopWidth = 2592, RDP.DesktopWidth = 2592, This line is comlete missing in my log: RDP resize to: W = 1892, H = 1336, ScaleFactor = 225 I have a warning in my log: [ProtocolRunnerHostHelper.cs(GetRunner:32)]    we don't have a protocol named: RDP Do you intentionally log RDP.DesktopWidth twice in one line? HTH, Markus [T:001][19:36:34.903] `Debug` SetSelfStartingHelper.SetSelfStartByRegistryKey(True, "PRemoteM") [T:001][19:36:34.912] `Warning` [ProtocolRunnerHostHelper.cs(GetRunner:32)] we don't have a protocol named: RDP [T:001][19:36:34.913] `Debug` CloseEmptyWindows: closing tab(57223682) [T:001][19:36:34.913] `Info` CloseEmptyWindows: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 1, WindowToBeDispose = 1 [T:001][19:36:34.914] `Warning` [SessionControlService.cs(ConnectWithTab:208)] CloseEmptyWindows: 1 Empty Host closed [T:001][19:36:34.914] `Debug` Closing: 1 Empty Host. [T:001][19:36:34.918] `Info` CloseMarkedProtocolHost: Current: Host = 0, Full = 0, Tab = 0, HostToBeDispose = 0, WindowToBeDispose = 0 [T:001][19:36:34.919] `Debug` Disposing AxMsRdpClient09Host(32772220) [T:001][19:36:34.957] `Debug` RDP Host: _rdpClient.Dispose() [T:001][19:36:34.958] `Debug` Dispose done AxMsRdpClient09Host(32772220) [T:001][19:36:35.039] `Debug` AxMsRdpClient09Host: Status => Initializing [T:001][19:36:35.040] `Debug` RDP Host: _rdpClient.Dispose() [T:001][19:36:35.041] `Debug` RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx() [T:001][19:36:35.042] `Debug` RDP Host: init CreateControl(); [T:001][19:36:35.058] `Debug` RDP Host: init Static [T:001][19:36:35.059] `Debug` RDP Host: init conn bar [T:001][19:36:35.060] `Debug` RDP Host: init Redirect [T:001][19:36:35.062] `Debug` RDP Host: init Display with ScaleFactor = 225, W = 1153, H = 709 [T:001][19:36:35.063] `Debug` RDP Host: Display init end: RDP.DesktopWidth = 2592, RDP.DesktopWidth = 2592, [T:001][19:36:35.064] `Debug` RDP Host: init Performance [T:001][19:36:35.065] `Debug` RdpInit: DisplayPerformance = Auto, flag = 0 [T:001][19:36:35.065] `Debug` RDP Host: init Gateway [T:001][19:36:35.066] `Debug` AxMsRdpClient09Host: Status => Initialized [T:001][19:36:35.070] `Debug` AxMsRdpClient09Host: Status => Connecting [T:001][19:36:35.152] `Info` ShowRemoteHost: Current: Host = 1, Full = 0, Tab = 1, HostToBeDispose = 0, WindowToBeDispose = 0 [T:001][19:36:35.919] `Debug` RDP Host: RdpOnOnConnected [T:001][19:36:35.920] `Debug` AxMsRdpClient09Host: Status => Connected [T:001][19:36:36.583] `Debug` RDP Host: RdpOnOnLoginComplete
Author
Owner

@MWinhard commented on GitHub (Aug 25, 2022):

Hi Shawn,

  1. Thank you for fixing the left/top problem. Can I test the new version
    without compiling the source code myself?

  2. I think I've found the reason for the "height not restored" problem. :-)

Tab window restore works with any combination of "Taskbar location on
screen" = Top/Bottom and "Use small taskbar buttons" = Off/On. - As long
as you leave one oder more pixels space between tab window and taskbar,
and between tab window and upper/lower screen border.

It doesn't work any more as soon as you "dock" the window at top and bottom.

So i think with non-maximized tab windows you should also remember if
the tab window was docked at top and bottom. Or, if there's no way to
query if the tab window is docked, allow a few pixels more height than
"screen height minus taskbar height" before you decide the tab window's
height is too big to restore.

TIA,

Markus

<!-- gh-comment-id:1227609793 --> @MWinhard commented on GitHub (Aug 25, 2022): Hi Shawn, 1. Thank you for fixing the left/top problem. Can I test the new version without compiling the source code myself? 2. I think I've found the reason for the "height not restored" problem. :-) Tab window restore works with any combination of "Taskbar location on screen" = Top/Bottom and "Use small taskbar buttons" = Off/On. - As long as you leave one oder more pixels space between tab window and taskbar, and between tab window and upper/lower screen border. It doesn't work any more as soon as you "dock" the window at top and bottom. So i think with non-maximized tab windows you should also remember if the tab window was docked at top and bottom. Or, if there's no way to query if the tab window is docked, allow a few pixels more height than "screen height minus taskbar height" before you decide the tab window's height is too big to restore. TIA, Markus
Author
Owner

@VShawn commented on GitHub (Aug 26, 2022):

Looks like your screen size is not 4k and your tab window size is smaller than mine:

my screen is 4k as yours.

image

I have a warning in my log

Don't worry, it doesn't matter :)

Do you intentionally log RDP.DesktopWidth twice in one line?

Is't a mistake, it should be DesktopWidth and DesktopHeight. Don't worry, it won’t be a obstacle to our observation.

This line is comlete missing in my log:RDP resize to: W = 1892, H = 1336, ScaleFactor = 225

Weird, It should have be at least one resizing after RDP Host: RdpOnOnLoginComplete

Other part works fine according to your log.

Can you

  1. check if the Display init size equal your tab window size?

  2. drag tab window 1 pix bigger to tigger RDP resize and see how it log. And compare the new size with the size Display init.

mine is:

[T:001][08:31:34.480]	`Debug`		Tab size change to:W = 939, H = 694, Child NaN, NaN

[T:001][08:31:34.999]	`Debug`		RDP resize to: W = 935, H = 660, ScaleFactor = 100
  1. try the 100 150 scale factor, and see how it works

image

Can I test the new version without compiling the source code myself?

Here is the new package, I guess it may not help with the scrool bar you met.

PRemoteM.0.7.1.6.Alpha-x86-Net6.zip

<!-- gh-comment-id:1227908320 --> @VShawn commented on GitHub (Aug 26, 2022): > Looks like your screen size is not 4k and your tab window size is smaller than mine: my screen is 4k as yours. ![image](https://user-images.githubusercontent.com/10143738/186792397-f40fefec-b5cd-4f93-b14b-345ea1a5e06e.png) > I have a warning in my log Don't worry, it doesn't matter :) > Do you intentionally log RDP.DesktopWidth twice in one line? Is't a mistake, it should be DesktopWidth and DesktopHeight. Don't worry, it won’t be a obstacle to our observation. > This line is comlete missing in my log:RDP resize to: W = 1892, H = 1336, ScaleFactor = 225 Weird, It should have be at least one resizing after `RDP Host: RdpOnOnLoginComplete` Other part works fine according to your log. Can you 0. check if the `Display init` size equal your tab window size? 1. drag tab window 1 pix bigger to tigger RDP resize and see how it log. And compare the new size with the size `Display init`. mine is: ``` [T:001][08:31:34.480] `Debug` Tab size change to:W = 939, H = 694, Child NaN, NaN [T:001][08:31:34.999] `Debug` RDP resize to: W = 935, H = 660, ScaleFactor = 100 ``` 2. try the 100 150 scale factor, and see how it works ![image](https://user-images.githubusercontent.com/10143738/186795172-25c7da08-7fca-4894-a95c-446f1c1cdbe3.png) > Can I test the new version without compiling the source code myself? Here is the new package, I guess it may not help with the scrool bar you met. [PRemoteM.0.7.1.6.Alpha-x86-Net6.zip](https://github.com/1Remote/PRemoteM/files/9429057/PRemoteM.0.7.1.6.Alpha-x86-Net6.zip)
Author
Owner

@MWinhard commented on GitHub (Aug 26, 2022):

I tried again using version 0.7.1.6 alpha that you gave me. I will also try the timer version if you send me the url.

150% zoom makes no difference with my current problem, but it's a great addition to scale the RDP session independent from my desktop zoom factor!

Ths only thing is that typing 15 writes 300 to the textbox. I had to paste the 150 into the textbox.

Back to the original problem.
Restoring the previous left/top/width/height works as expected as long as I leave a few pixels space around the tab window. This is my Locality.json afterwards:

{
"MainWindowWidth": 970.2222222222222,
"MainWindowHeight": 616.8888888888888,
"TabWindowTop": 31.555555555555554,
"TabWindowLeft": 1.3333333333333333,
"TabWindowWidth": 1157.7777777777776,
"TabWindowHeight": 926.6666666666666,
"TabWindowState": 0,
"ServerOrderBy": -1,
"RdpLocalitys": {
"1": {
"LastUpdateTime": "2022-08-11T15:28:55.6218361+02:00",
"FullScreenLastSessionIsFullScreen": false,
"FullScreenLastSessionScreenIndex": -1
}
}
}

As soon as I move the tab window any nearer to the left/top/bottom, or the tab window is even docked to the top/left/bottom (as I like to do), the height and/or left/top isn't restored.

I took a look at your code. Perhaps the root of the problem is in TabWindowBase.Init(TabablzControl tabablzControl). What if we simply add a few "tolerance" pixels to screenEx.VirtualWorkingArea before we decide the window is outside of the available screen area?

if (this.Height >= screenEx.VirtualWorkingArea.Height + 6)
    this.Height = Math.Min(screenEx.VirtualWorkingArea.Height * 0.8, this.Height * 0.8);

Same numer of "tolerance" pixels for left/top/width.

What do you think?

<!-- gh-comment-id:1228446296 --> @MWinhard commented on GitHub (Aug 26, 2022): I tried again using version 0.7.1.6 alpha that you gave me. I will also try the timer version if you send me the url. 150% zoom makes no difference with my current problem, but it's a great addition to scale the RDP session independent from my desktop zoom factor! Ths only thing is that typing 15 writes 300 to the textbox. I had to paste the 150 into the textbox. Back to the original problem. Restoring the previous left/top/width/height works as expected as long as I leave a few pixels space around the tab window. This is my Locality.json afterwards: { "MainWindowWidth": 970.2222222222222, "MainWindowHeight": 616.8888888888888, "TabWindowTop": 31.555555555555554, "TabWindowLeft": 1.3333333333333333, "TabWindowWidth": 1157.7777777777776, "TabWindowHeight": 926.6666666666666, "TabWindowState": 0, "ServerOrderBy": -1, "RdpLocalitys": { "1": { "LastUpdateTime": "2022-08-11T15:28:55.6218361+02:00", "FullScreenLastSessionIsFullScreen": false, "FullScreenLastSessionScreenIndex": -1 } } } As soon as I move the tab window any nearer to the left/top/bottom, or the tab window is even docked to the top/left/bottom (as I like to do), the height and/or left/top isn't restored. I took a look at your code. Perhaps the root of the problem is in TabWindowBase.Init(TabablzControl tabablzControl). What if we simply add a few "tolerance" pixels to screenEx.VirtualWorkingArea before we decide the window is outside of the available screen area? ``` if (this.Height >= screenEx.VirtualWorkingArea.Height + 6) this.Height = Math.Min(screenEx.VirtualWorkingArea.Height * 0.8, this.Height * 0.8); ``` Same numer of "tolerance" pixels for left/top/width. What do you think?
Author
Owner

@VShawn commented on GitHub (Aug 26, 2022):

sounds reasonable, so I make an improvement.

https://github.com/1Remote/PRemoteM/blob/dev_net6/Ui/View/Host/TabWindowBase.cs#L209-L232

PRemoteM.0.7.1.6.AlphaB2-x86-Net6.zip.zip

<!-- gh-comment-id:1228527605 --> @VShawn commented on GitHub (Aug 26, 2022): sounds reasonable, so I make an improvement. https://github.com/1Remote/PRemoteM/blob/dev_net6/Ui/View/Host/TabWindowBase.cs#L209-L232 [PRemoteM.0.7.1.6.AlphaB2-x86-Net6.zip.zip](https://github.com/1Remote/PRemoteM/files/9433758/PRemoteM.0.7.1.6.AlphaB2-x86-Net6.zip.zip)
Author
Owner

@MWinhard commented on GitHub (Aug 26, 2022):

Using the attached 0.7.1.6 alphaB2 it works as advertised. I think we have a winner. :-) :-) :-)

<!-- gh-comment-id:1228573506 --> @MWinhard commented on GitHub (Aug 26, 2022): Using the attached 0.7.1.6 alphaB2 it works as advertised. I think we have a winner. :-) :-) :-)
Author
Owner

@VShawn commented on GitHub (Aug 27, 2022):

and thanks for your support :)

<!-- gh-comment-id:1229078999 --> @VShawn commented on GitHub (Aug 27, 2022): and thanks for your support :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#246
No description provided.