[PR #1050] [MERGED] Fix: focus selected tab content #954

Closed
opened 2026-02-26 12:00:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/1Remote/1Remote/pull/1050
Author: @itagagaki
Created: 1/2/2026
Status: Merged
Merged: 1/5/2026
Merged by: @VShawn

Base: mainHead: fix-530-focus-selected-tab-content


📝 Commits (3)

  • a7f95c5 fix: focus selected tab content
  • d3c2a63 Use SetForegroundWindow instead of the sending WM_SETFOCUS
  • bfbd4bf Add comments

📊 Changes

3 files changed (+97 additions, -2 deletions)

View changed files

📝 Ui/Utils/WindowsApi/WindowsVersionHelper.cs (+23 -0)
📝 Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs (+2 -1)
📝 Ui/View/Host/TabWindowViewModel.cs (+72 -1)

📄 Description

This resolve #530
This is not perfect but almost fine.


In the following case, keystrokes do not reach the active window on the remote host:

  1. Connect to Host A --> keystrokes reach the active window on Host A.
  2. Connect to Host B in the same host window --> keystrokes reach the active window on Host B.
  3. Click the Host A tab --> the content switches, but keystrokes do not reach either Host A or Host B.

The cause is unknown. However, if you make activate a remote window by clicking on it with the mouse, keystrokes will reach it. After that, switching tabs will correctly send keystrokes to the active window of the host that has been switched to.


For now, I think it's best to merge this fix and file the above case as a new issue.
(P.S. Filed. --> #1052)

I have left the code for AxMsRdpClient09Host.FocusOnMe() as-is since I don't understand its intention, but the application behaves as expected even without calling it (except for the aforementioned issue).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/1Remote/1Remote/pull/1050 **Author:** [@itagagaki](https://github.com/itagagaki) **Created:** 1/2/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@VShawn](https://github.com/VShawn) **Base:** `main` ← **Head:** `fix-530-focus-selected-tab-content` --- ### 📝 Commits (3) - [`a7f95c5`](https://github.com/1Remote/1Remote/commit/a7f95c583b9dfbe93a470ae2f8e2c11324a66d33) fix: focus selected tab content - [`d3c2a63`](https://github.com/1Remote/1Remote/commit/d3c2a63c1cf3530f53c826cd6308722f4f7d95d7) Use SetForegroundWindow instead of the sending WM_SETFOCUS - [`bfbd4bf`](https://github.com/1Remote/1Remote/commit/bfbd4bf08efeeb769bc2dd720bd20f512d38e520) Add comments ### 📊 Changes **3 files changed** (+97 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Ui/Utils/WindowsApi/WindowsVersionHelper.cs` (+23 -0) 📝 `Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs` (+2 -1) 📝 `Ui/View/Host/TabWindowViewModel.cs` (+72 -1) </details> ### 📄 Description This resolve #530 This is not perfect but almost fine. --- In the following case, keystrokes do not reach the active window on the remote host: 1. Connect to Host A --> keystrokes reach the active window on Host A. 2. Connect to Host B in the same host window --> keystrokes reach the active window on Host B. 3. Click the Host A tab --> the content switches, but keystrokes do not reach either Host A or Host B. The cause is unknown. However, if you make activate a remote window by clicking on it with the mouse, keystrokes will reach it. After that, switching tabs will correctly send keystrokes to the active window of the host that has been switched to. --- For now, I think it's best to merge this fix and file the above case as a new issue. (P.S. Filed. --> #1052) I have left the code for AxMsRdpClient09Host.FocusOnMe() as-is since I don't understand its intention, but the application behaves as expected even without calling it (except for the aforementioned issue). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:00:37 +03:00
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#954
No description provided.