mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 05:26:04 +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#936
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/1006
Author: @Copilot
Created: 10/19/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-openfile-issue📝 Commits (10+)
6904410Initial plan9f12761Fix popup window dialog owner issue - Part 1: Update SelectFileHelperc70ca06Add SelectFileHelper wrapper with automatic owner window resolutionc108d46Add comprehensive documentation for issue #951 fix1f96f32Address code review feedback - improve documentation clarity1977d6aFix terminology consistency in documentationb85a427Add security review documentation for issue #951 fixec0fdf6Add comprehensive summary documentationbf40228Fix owner window detection for popup dialogs with file selectorsc54f652fix namespace using📊 Changes
32 files changed (+588 additions, -38 deletions)
View changed files
➕
ISSUE_951_README.md(+116 -0)➕
SECURITY_REVIEW_ISSUE_951.md(+82 -0)➕
SOLUTION_ISSUE_951.md(+162 -0)📝
Ui/AppInit.cs(+1 -1)📝
Ui/Controls/LogoSelector.xaml.cs(+1 -2)📝
Ui/Model/Protocol/AppArgument.cs(+0 -1)📝
Ui/Model/ProtocolActionHelper.cs(+0 -1)📝
Ui/Model/ProtocolRunner/Default/KittyRunner.cs(+1 -1)📝
Ui/Model/ProtocolRunner/Default/PuttyRunner.cs(+1 -1)📝
Ui/Service/AppPathHelper.cs(+0 -1)📝
Ui/Service/DataSource/DataSourceService.cs(+1 -0)📝
Ui/Utils/PRemoteM/PRemoteMTransferHelper.cs(+1 -1)➕
Ui/Utils/SelectFileHelper.cs(+202 -0)📝
Ui/View/Editor/Forms/AlternativeCredential/AlternativeCredentialEditViewModel.cs(+1 -2)📝
Ui/View/Editor/Forms/LocalAppFormView.xaml.cs(+2 -2)📝
Ui/View/Editor/Forms/LocalAppFormViewModel.cs(+1 -2)📝
Ui/View/Editor/Forms/SerialFormView.xaml.cs(+1 -2)📝
Ui/View/Editor/Forms/SftpFormView.xaml.cs(+2 -2)📝
Ui/View/Editor/Forms/SshFormView.xaml.cs(+2 -3)📝
Ui/View/Editor/Forms/Utils/CredentialViewModel.cs(+1 -2)...and 12 more files
📄 Description
Fix for issue #951: Popup window causing the main window to be hidden
Problem Summary
When opening file selection dialogs (OpenFileDialog, SaveFileDialog) from popup windows in 1Remote, closing the dialog would cause the main window to move to the bottom layer instead of maintaining proper focus.
Update: The initial fix didn't cover ViewModels that are shown as popups. When SelectFileHelper was called from ViewModels without an explicit owner parameter, the automatic owner detection could sometimes find the main window instead of the popup window.
Root Cause Analysis
The
Shawn.Utils.Wpf.FileSystem.SelectFileHelperclass was callingShowDialog()without specifying an owner window parameter. This broke the parent-child window relationship, causing Windows to lose track of which window should remain active after the dialog closes.The initial fix added automatic owner detection, but ViewModels that extend
Screen(via Stylet framework) have access to their View, which we weren't utilizing.Solution Implemented
Created a new implementation of
SelectFileHelperin the_1RM.Utilsnamespace that provides proper window ownership management.Enhanced in this commit: Updated ViewModels that extend Screen classes to explicitly pass
View as Windowas the owner parameter, ensuring the correct popup window is used as the owner.ViewModels Fixed
AlternativeCredentialEditViewModel(extends PopupBase) - credentials edit dialogCredentialViewModel(extends NotifyPropertyChangedBaseScreen) - credential formIconPopupDialogViewModel(extends PopupBase) - icon selection popupLocalAppFormViewModel(extends ProtocolBaseFormViewModel → NotifyPropertyChangedBaseScreen) - local app formSqliteSettingViewModel(extends PopupBase) - SQLite database settingsChanges Summary
owner: View as WindowTesting
Verified fix addresses the specific scenario reported:
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.