mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
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#2859
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?
📋 Pull Request Information
Original PR: https://github.com/1Remote/1Remote/pull/1007
Author: @Copilot
Created: 10/19/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-issue-688-problem📝 Commits (3)
3164840Initial plan7b0f4f6Fix RDP window resize issues for multiple connections18ba476Address code review: extract magic numbers to named constants📊 Changes
1 file changed (+21 additions, -5 deletions)
View changed files
📝
Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs(+21 -5)📄 Description
Summary
This PR fixes issue #688 where RDP windows stay small when connecting to multiple servers simultaneously. Users reported that windows would remain at a tiny size (288×200 pixels) and fail to resize automatically, particularly when opening more than 3 connections. The only workaround was to manually move the 1Remote window to trigger a resize.
Root Causes
1. Critical Concurrency Bug - Static Lock Variable
The
_isReSizeRdpToControlSizeRunningflag was declared asstatic, causing it to be shared across all RDP connection instances:Impact: When multiple RDP connections were establishing simultaneously, only one could execute the resize logic at a time. Other connections would detect the flag was set and return early, never resizing their windows. This explains why the issue occurred more frequently after opening 3+ connections.
2. Premature Timer Termination
The
_loginResizeTimerlogic would stop retrying if the desktop size wasn't larger than the control size:Impact: During initialization, the control might not be properly sized yet (still at default 288×200). The timer would see that the desktop wasn't "larger" than this default size and stop retrying, leaving the window stuck at the small default size.
Changes Made
1. Fixed Static Variable Concurrency Issue
Changed
_isReSizeRdpToControlSizeRunningfrom static to instance variable. Each RDP connection now has its own resize lock, allowing multiple connections to resize simultaneously without blocking each other.2. Improved Timer Logic
The timer now properly handles initialization:
The timer now:
3. Code Quality Improvements
Extracted magic numbers to named constants for better maintainability:
Testing
This fix directly addresses the user-reported symptoms:
Related Issues
Files Changed
Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs- Fixed static variable and improved timer logicOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.