Mouse input blocked by transparent window when any msys shell is opened
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.
Could you provide a screenshot of that transparent window? What is the content of ~/.minttyrc file?
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.
I have the same issue on Windows 11. The attached video shows the behavior.
https://github.com/msys2/msys2-runtime/assets/1313780/ddabe680-6ae9-41ae-bb70-e8d218ed275e
- 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
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.