Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview - Mouse cursor doesn't reappear when switching workspaces during mouse hide #8958

Open
nmelnick opened this issue Jan 29, 2021 · 12 comments
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@nmelnick
Copy link

nmelnick commented Jan 29, 2021

Environment

Windows build number: 10.0.19042.0
Windows Terminal version (if applicable): 1.6.10272.0

Any other software?
Hopefully none applicable, but:
* Switching between tasks in Terminal and Edge
* Lenovo Vantage and/or ELAN TrackPoint
* PowerToys

Steps to reproduce

  • In a WSL 2 bash terminal, begin typing
  • Watch the mouse cursor disappear
  • Switch workspaces without moving the mouse (Ctrl-Win-Left/Right)

Expected behavior

Mouse cursor reappears on workspace switch

Actual behavior

Mouse cursor remains invisible (unless you change the size in mouse settings, or find the title bar and maximize/restore the window)

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 29, 2021
@Don-Vito
Copy link
Contributor

@nmelnick - I am trying to reproduce it, but without any success. I don't have Lenovo and trackpoint though.
This is what I do:

  • Open Terminal (not maximized)
  • Open WSL2 Ubuntu tab with bash
  • Start typing so the mouse disappears
  • Ctrl-Win-Right to switch to the next workspace with Edge open
  • Browse in edge without a mouse
  • Ctrl-Win-Left to return to the original workspace
  • The cursor is visible

Can you please review my steps?
Few other questions:

  • Does this behavior depend on the location of the pointer?
  • Can you please try to repro it using a mouse rather than track point?

This is extremely interesting / weird as the cursor is restored the moment the terminal in the tab loses focus.

@nmelnick
Copy link
Author

@Don-Vito Thanks for the reply!

Hm. Yesterday, I had a mouse connected, today, I'm TrackPoint only, so yesterday was testing with a mouse. I obviously cannot remove the TrackPoint entirely, but I don't currently have another Windows machine to test with.

I attempted to recreate your steps, with the difference of the WSL2 tab being my default tab. I put Edge on my second workspace, Terminal on my first.

  • Open Terminal, not maximized. Terminal opens with a WSL2 tab.
  • Hit enter, cursor disappears
  • Ctrl-Win-Right to go to my Edge tab without moving the mouse
  • Move the mouse, no cursor exists (however, a cursor is there, as objects highlight)
  • Ctrl-Win-Left to original workspace, where Terminal remains the active application
  • Mouse does not exist
  • Note: If I type again in the Terminal, and then mouse out, the cursor does reappear -- but ONLY if I type in the Terminal first, and then mouse out

I then duplicated this with a PowerShell Core tab and a PowerShell tab, and the same behavior occurs. I attempted the same action without Edge, and instead, just Notepad on the second desktop, and the same thing occurs.

I'm going to attempt to borrow another machine today, install the preview, and see if I can duplicate or if I have something incredibly weird on my machine.

@Don-Vito
Copy link
Contributor

@nmelnick - thanks for the insights!
Do you say that the mouse isn't shown in the second workspace (the one containing the Edge) as well?

@nmelnick
Copy link
Author

nmelnick commented Feb 1, 2021

@Don-Vito That's correct. The cursor is not shown in the next workspace, including attempting to mouse around in Edge. Mouseover events still fire, just no visible cursor. If I go back to the Terminal workspace, and press a key in it, then mouse around, the cursor will reappear. It seems that the event to show the cursor is not firing when I switch workspaces with the cursor in a hidden state.

@Don-Vito
Copy link
Contributor

Don-Vito commented Feb 1, 2021

@Don-Vito That's correct. The cursor is not shown in the next workspace, including attempting to mouse around in Edge. Mouseover events still fire, just no visible cursor. If I go back to the Terminal workspace, and press a key in it, then mouse around, the cursor will reappear. It seems that the event to show the cursor is not firing when I switch workspaces with the cursor in a hidden state.

@DHowett - I am starting to lose my confidence of understanding windows internals. How can changing a cursor for a window in one app, to affect the cursor in the window of another process (in another workspace).

@zadjii-msft
Copy link
Member

starting

Yea, controlling how the pointer looks is a special type of hell, for whatever reason. It's why #5028 is still blocked 😕

@Don-Vito
Copy link
Contributor

Don-Vito commented Feb 1, 2021

starting

Yea, controlling how the pointer looks is a special type of hell, for whatever reason. It's why #5028 is still blocked 😕

I mean if this is possible then one app can screw the entire OS that easily 😊

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Feb 12, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 12, 2021
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Feb 12, 2021
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 26, 2021
@Darival
Copy link

Darival commented Mar 31, 2021

I'm experiencing the same behavior, when I start typing on the terminal the cursor disappears, then if I switch workspace it stays invisible even if switch back to the workspace containing the terminal.
I have to type something on the terminal and then move the mouse for it to reappear.

Is there any way to disable cursor disappearing when typing in the terminal?

@Don-Vito
Copy link
Contributor

Don-Vito commented Apr 1, 2021

Currently this behavior is controlled by the global seetting:

Screenshot_20210401-193212_Google.jpg

Does it reproduce consistently? Can you please share a repro steps?

@zadjii-msft
Copy link
Member

Okay despite the fact that e don't really have a repro for this bug - I had an idea that might help with this and also #1441. Maybe we should at the IslandWindow level restore the mouse pointer when the window loses focus. This might prevent us from polluting the global pointer state.

I guess it doesn't help with the intra-app pollution that we were seeing (where it's Hard to switch the cursor only while over a single control), but an idea nonetheless

@DHowett
Copy link
Member

DHowett commented Apr 14, 2021

This is a good idea.

@MPeti1
Copy link

MPeti1 commented Dec 22, 2021

I have experienced this too for some time. I never understood why does it happen, but then moved one instance of the terminal to an other workspace and then it happened every single time I switched from a workspace with maximized WT to a workspace with Firefox, or basically any other program.

Some things I noticed:
If I'm on a workspace that has an instance of WT, type something so the mouse disappears, and then switch to one that also has an instance of WT, and type something there, after moving the mouse it reappears correctly. Window size does not seem to matter.

Also, for those who don't want to disable cursor hiding while typing: a Ctrl+Alt+Delete and then Esc also makes the cursor visible. It's still annoxing, but quicker.
But I'm now going to disable that cursor hiding option :D

However, I have a regular mouse (though wireless and has extra buttons, but that probably doesn't matter), so if the devs have questions or a beta patch, let me know if I can help with investigating this.

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H2 Jan 4, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H2, Backlog Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

6 participants