mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[GH-ISSUE #537] "Fit to window" sets client size to host screen size then hides overlapsed with scrollbars. #1393
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#1393
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @karnasw on GitHub (Oct 22, 2023).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/537
Originally assigned to: @VShawn on GitHub.
Describe the bug
"Fit to window" sets client size to host screen size then hides overlapsed with scrollbars.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Fit to window without scrollbars and fully visible resources on client desktop.
Screenshots

Desktop (please complete the following information):
Additional context
I have to "refresh/reconnect" to client or drag window to maximize again. I have 3840x2160 resolutiuon.
@VShawn commented on GitHub (Oct 25, 2023):
Fit to windowworks great on me(win10 to win2016 with 4k 200% screen),And occasionally, when the network connection is poor, there might be an issue with synchronizing the window size and RDP size (in such cases, manually adjusting the window size can resolve the issue).
So do you encounter the issue you described every time you connect?
And I noted it seems like your monitor resolution is high. Can you tell me the settings?
@karnasw commented on GitHub (Oct 25, 2023):
I have 3840x2160 on host and 125% scale.
Almost everytime. I have that on many clients, different connection types, (fiber, DSL). PC host with 4K resolution and notebook with 1080p resolution also.
@karnasw commented on GitHub (Oct 25, 2023):
Something is wrong after last update. All my connections settings are empty, but connection works as always. So those settings are somewhere, but not visible in connection setup.
@karnasw commented on GitHub (Oct 26, 2023):
https://github.com/1Remote/1Remote/assets/627198/abbfbad6-ae61-413b-a0b4-d6924cec3195
Video with that problem.
@majkinetor commented on GitHub (Oct 26, 2023):
I had this before but I tested this now with couple remotes and with Fit to window and can't confirm it. I can see it sarting with scrollbars for 1s but then it refits.
Running from W11 with 110% font size, connecting to W10 desktop and server,
@majkinetor commented on GitHub (Nov 24, 2023):
It happened to me again too. Need to see how to reproduce it.
@VShawn commented on GitHub (Nov 25, 2023):
I've come up with a possible explanation. When using a 150% scaling resolution, the initial resolution of RDP needs to be calculated by dividing the actual desktop resolution by 1.5. when dividing an even number by 1.5, it can lead to an incorrect resolution.
@VShawn commented on GitHub (Nov 26, 2023):
hey guys, I try to fix this issue by following this above, you can upgrade to the latest nightly build to try it. plz let me know if any improve or it not works.
@karnasw commented on GitHub (Nov 27, 2023):
Hi, window still doesn't fit on 20231126-458e48. Tried 3-4 times and it connects fast, but always with scrollbars and wrong client size.
@VShawn commented on GitHub (Nov 27, 2023):
@karnasw
Okey, can you help collect error logs for analysis?
Here's what you can do:
Change the log level to "Debug" in the settings.
Reproduce the issue.
Open the log file and copy the resolution change logs for me.
Check the true resolution of the display area that TAb can show. For example, mine is 3836*2067.
@karnasw commented on GitHub (Nov 27, 2023):
Of course:
Resolution that tab can show:
3820x2034 (smaller because of coloured borders)
@VShawn commented on GitHub (Nov 27, 2023):
@karnasw Thankyou! Then we find out why scrollbars came up on your desk
The tab size is
And RDP init as :
The set width is exactly 1 pix larger than the actual width!
In
github.com/1Remote/1Remote@458e486c3b, I did apply a 1-pix compensation for RDP. It worked fine on my desktop, but on your desktop, It requires a 2-pixel compensation. Maybe the "coloured borders" have increased the error by 1 pixel? Not sure, i need some test before next move.@karnasw commented on GitHub (Nov 27, 2023):
I have to say that same problem exists also on my 1920x1080 notebook.
@karnasw commented on GitHub (Nov 28, 2023):
I checked on turned off border.
Tab size (checked with ShareX): 3836x2042
@VShawn commented on GitHub (Nov 30, 2023):
The key to the problem lies in measuring the resolution that RDP needs to display before opening the window. I found that it required different resolution compensation values under different scaling rates, and I haven't been able to identify a pattern, and not sure if their the same on different PC.
then, I was unable to reproduce the issue on a 1080p monitor like @karnasw report. (It may be because my 1080p is using a 100% scaling rate.)
After testing it for several days without making progress, I have decided to use a workaround to address this problem temporarily. it causes a flicker during RDP connection.
@karnasw commented on GitHub (Dec 3, 2023):
Now it flickers for almost 30 seconds.
@VShawn commented on GitHub (Dec 4, 2023):
@karnasw then it means RDP keep calling UpdateSessionDisplaySettings in 30s....
It is designed to call UpdateSessionDisplaySettings only once as long as the resolution does not change.
flickering for 30 seconds should not occur. please show me the log to check out why it flickers
@karnasw commented on GitHub (Dec 4, 2023):
logs
@karnasw commented on GitHub (Dec 5, 2023):
On build 1Remote-1.0.0.0-beta.06-net6-x64-nightly-20231022-cbab80 from first post, scrollbar were overlapsing on few clients. Then after few fixes it was overlapsing on all clients. Now it flickers on all clients.
I rollbacked to 1Remote-1.0.0.0-beta.07-net6-x64-nightly-20231126-458e48, best so far.
@VShawn commented on GitHub (Dec 6, 2023):
@karnasw
apologize for late. I have been very busy lately, and haven't had time to maintain 1Remote. The
UpdateSessionDisplaySettingsfunction is only called when any of the W, H, ScaleFactor parameters are changed. I am surprised to see thatUpdateSessionDisplaySettingshas been called times with the same parameters in your case, and I am unsure why it is happening. I might also need to roll back the code to the previous version now...@VShawn commented on GitHub (Dec 7, 2023):
@karnasw I think the latest commit will improve the flickers.
@karnasw commented on GitHub (Dec 7, 2023):
Still flickers:
logs
@VShawn commented on GitHub (Dec 8, 2023):
Welll ... after reproducing it on one of my computers, the flickers on my computer were fixed with commit
github.com/1Remote/1Remote@3e16e2292e. I didn't expect that there are still flickers on your side. I wiil continue testing this issue when I have time over the weekend. If it still cannot be resolved after next Sunday, I plan to roll back the code.@karnasw commented on GitHub (Dec 11, 2023):
Thanks, last changes works perfect :)