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

Mouse input blocked by transparent window when any msys shell is opened #162

Open
3N4N opened this issue Jul 9, 2023 · 4 comments
Open

Comments

@3N4N
Copy link

3N4N commented Jul 9, 2023

I'm on Windows 11 and mainly use msys2 shells (UCRT64 mainly) inside MS Terminal, which means I run this command:

C:/msys64/msys2_shell.cmd -full-path -defterm -no-start -here -ucrt64

This causes no problem. But when I run msys2 shells in mintty, so the command above without -defterm arg, there seems to spawn a transparent window always on top hogging a region of the screen and blocking all mouse input inside that region. I am sure this is related to msys2 shells run in mintty because when I close the msys2 shell in mintty, the mouse inputs/clicks aren't blocked by a transparent window, and it's not caused by the shells in MS Terminal with -defterm arg, so something else is going on here.

Also, I wanted to run msys2 shells in mintty so I could use msys's tmux (it doesn't open on MS Terminal). When I spawn a tmux session, even if I then kill the mintty shell, the transparent window persists, which means it's not a mintty issue, either. From here, I don't know how to debug.

@Biswa96
Copy link
Member

Biswa96 commented Jul 9, 2023

Could you provide a screenshot of that transparent window? What is the content of ~/.minttyrc file?

@3N4N
Copy link
Author

3N4N commented Jul 9, 2023

Could you provide a screenshot of that transparent window?

By transparent I meant it's not visible at all, so there is nothing to screenshot. The question might be: how do I know there is a transparent window if I can't see it? Answer is: I don't know for sure. But after opening msys2 shell in mintty, when I click within a certain region of the screen, the active window goes inactive, and subsequent mouse clicks within that region don't activate any of the visible windows.

What is the content of ~/.minttyrc file?

CursorType=block
CursorBlinks=no
Font=JetBrains Mono NL
FontHeight=10
Columns=100
Rows=40
ClipShortcuts=no
CtrlShiftShortcuts=yes

BackgroundColour=#FAFAFA
Black=#373737
Blue=#0184BC
BoldBlack=#4F525D
BoldBlue=#61AFEF
BoldCyan=#56B5C1
BoldGreen=#98C379
BoldMagenta=#C577DD
BoldRed=#DF6C75
BoldWhite=#FAFAFA
BoldYellow=#E4C07A
CursorColour=253,157,79
Cyan=#0997B3
ForegroundColour=#373737
Green=#50A14F
Magenta=#A626A4
Red=#E45649
White=#FCF4DC
Yellow=180,136,29

Term=xterm-256color
Scrollbar=none

By the way, it doesn't happen everytime. Some days, it doesn't happen. But most days, it does. There seems to be no rhyme or reason to it.

@AlanCristhian
Copy link

I have the same issue on Windows 11. The attached video shows the behavior.

msys2_mouse_bug.mp4
  • First I show that the mouse works fine, because it changes from arrow to hand when I hover a button.
  • Then I open a MSYS2 UCRT64 terminal from the start menu.
  • Then I switch to firefox and you cand see that when I hover a button, the mouse doesn't change. Is because it stop working.
  • Then I close the terminal and then the mouse just works as normal.

It also is inconsistent, sometimes works, sometimes not.

And also I discovered that the "transparent window" changes his position. I suspect that when it works is because the transparent window just spawn outside the screen.

This is my ~/.minttyrc file

Font=Iosevka
FontHeight=16
Padding=0
AutoLeading=1
Term=tmux-256color
Scrollbar=none
BellPopup=yes
CursorType=line
BoldAsFont=yes
FontSmoothing=full
LigaturesSupport=1

# Color Scheme
HighlightForegroundColour=#000000
HighlightBackgroundColour=#bea547
ForegroundColour=#cfcfcf
BackgroundColour=#282828
CursorColour=#ffffff
Black=#141414
BoldBlack=#000000
White=#a3a3a3
BoldWhite=#737373
Red=#fd8b8b
Yellow=#bea547
Green=#65bd60
Cyan=#4abbbb
Blue=#88a2ff
Magenta=#e28ae7
BoldRed=#e25555
BoldYellow=#947400
BoldGreen=#25931e
BoldCyan=#039191
BoldBlue=#5171e5
BoldMagenta=#c153c7

@dscho
Copy link
Collaborator

dscho commented Aug 14, 2023

I cannot reproduce this issue here. Maybe there is some sort of hook DLL at play? Some anti-malware for example? I'm clutching at straws here because nothing comes to mind that could cause this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants