microsoft / microsoft/terminal

Split Terminals - "focusFollowMouse": true,

Open
#20,456 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-UserInterface Issue-Bug Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.24.11911.0

### Windows build number

10.0.26200

### Other Software

_No response_

### Steps to reproduce

I have "focusFollowMouse": true,

I also have the k8s in a menu with a separator
It will look something like this:

Main Menu
├── Kubernetes Environment A
│ ├── Cluster A - Control Plane 1
│ ├── Cluster A - Control Plane 2
│ ├── Cluster A - Control Plane 3
│ ├── Cluster B - Control Plane 1
│ ├── Cluster B - Control Plane 2
│ ├── Cluster B - Control Plane 3
│ ├── Cluster B - Control Plane 4
----------separator------------
│ ├── Environment A - Control Planes
│ └── Environment A - Worker Nodes

a split pane example:
```
{
"colorScheme": "Raspberry",
"commandline": "wt -w 0 nt -p k8cp-01 ; sp -H -p k8cp-02 ; sp -V -p k8bcp-03",
"guid": "{e4a8f6c3-1451-477e-bf9f-e6aa8bb2b0c2}",
"icon": "C:\\Scripts\\WindowsTerminals\\windows-terminal-icons\\icons\\ubuntu.png",
"name": "K8 Control Planes",
"tabTitle": "k8-cp-1-3"
},
```

The issue is
I want the split screen to open like this every time.
```
-------------------------------------
| k8cp-01 |
-------------------------------------
| k8cp-02 | k8cp-03 |
-------------------------------------
```

The problem is that with focusFollowsMouse set to true, when you mouse leave the menu, you might be over the area of the screen that's not the first pane and you end up with really strange splits

The most common problem is the he mouse is in teh TOP pane and it splits that instead of the bottom pane
you end up with this:
```
-------------------------------------
| k8cp-01 | k8cp-03 |
-------------------------------------
| k8cp-02 |
-------------------------------------
```
Where I have the 4 way split
```
{
"colorScheme": "Raspberry",
"commandline": "wt -w 0 nt -p k8nd-01 ; sp -V -p k8nd-03 ; sp -H -p k8nd-04; mf left ; sp -H -p k8nd-02",
"guid": "{960f4d8d-b89a-4d75-8093-4f28ebb94839}",
"icon": "C:\\Scripts\\WindowsTerminals\\windows-terminal-icons\\icons\\ubuntu.png",
"name": "K8ND Worker Nodes",
"tabTitle": "k8nd-01-04"
}
```
```
-------------------------------------
| k8nd-01 | k8nd-03 |
-------------------------------------
| k8nd-02 | k8nd-04 |
-------------------------------------
````
It ends up looking like this:
```
-------------------------------------
| k8nd-01 | |
------------------| |
| k8nd-02 | k8nd-03 |
------------------| |
| k8nd-04 | |
-------------------------------------
```

### Expected Behavior

I would expect the application:
```
wt -w 0 nt -p k8nd-01 ; sp -V -p k8nd-03 ; sp -H -p k8nd-04; mf left ; sp -H -p k8nd-02
```
to ignore the mouse focus

### Actual Behavior

"focusFollowMouse": true,
is messing with terminal splits

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the split commands from the issue with "focusFollowMouse": true, moving the pointer away from the menu before each split. Compare the resulting pane layouts with the expected diagrams; done when the commands create the requested layouts regardless of the pointer's location.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.