mouse click not working in WSL script-based dialog when window is maximized #17729

Closed
opened 2026-01-31 05:51:34 +00:00 by claunia · 3 comments
Owner

Originally created by @twuyts on GitHub (Jun 16, 2022).

Windows Terminal version

1.13.11432.0

Windows build number

10.0.22000.708

Other Software

dialog in WSL

Steps to reproduce

  1. open a terminal in wsl, make sure the window is NOT maximized
  2. execute the command dialog --msgbox 'Click the button' 0 0 --> you should see a blue screen with a msgbox, and an OK button
  3. Click (with the mouse pointer) on the OK button.
  4. The dialog command should exit, and present you with the shell prompt.
  5. maximize the terminal window, and repeat steps 2->3
  6. clicking the OK button doesn't work

You can try with other widgets of the dialog command, e.g.
dialog --no-tags --checklist 'Check List' 0 0 0 opt1 'Option 1' on opt2 'Option 2' off

Expected Behavior

The mouse button should have the same behaviour, whether the terminal window is maximized or not.

Actual Behavior

Clicking the mouse button had no effect when the window was maximized.

Originally created by @twuyts on GitHub (Jun 16, 2022). ### Windows Terminal version 1.13.11432.0 ### Windows build number 10.0.22000.708 ### Other Software [dialog in WSL](https://linux.die.net/man/1/dialog) ### Steps to reproduce 1. open a terminal in wsl, make sure the window is NOT maximized 2. execute the command `dialog --msgbox 'Click the button' 0 0` --> you should see a blue screen with a msgbox, and an OK button 3. Click (with the mouse pointer) on the OK button. 4. The `dialog` command should exit, and present you with the shell prompt. 5. maximize the terminal window, and repeat steps 2->3 6. clicking the OK button doesn't work You can try with other widgets of the `dialog` command, e.g. `dialog --no-tags --checklist 'Check List' 0 0 0 opt1 'Option 1' on opt2 'Option 2' off` ### Expected Behavior The mouse button should have the same behaviour, whether the terminal window is maximized or not. ### Actual Behavior Clicking the mouse button had no effect when the window was maximized.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 05:51:34 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 16, 2022):

I'm guessing that dialog is using the standard mouse sequences. If I'm right, then this is basically the same root cause as #9928. The original VT mouse encoding[1] doesn't work past column ~93, due to some encoding issues. SGR mouse encoding, however, has no such issues. I'd reckon that imtui needs to be updated to use that encoding instead.

#13165 also has a long discussion on this topic

[1]: That doc mentions 223, but there's some issues that exist between the console and WSL.exe that cause us to be limited to only 93. Alas. More details in https://github.com/microsoft/terminal/issues/5454#issuecomment-656250431

@zadjii-msft commented on GitHub (Jun 16, 2022): I'm guessing that `dialog` is using the standard mouse sequences. If I'm right, then this is basically the same root cause as #9928. The [original VT mouse encoding](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Extended-coordinates)[1] doesn't work past column ~93, due to some encoding issues. SGR mouse encoding, however, has no such issues. I'd reckon that imtui needs to be updated to use that encoding instead. #13165 also has a long discussion on this topic [1]: That doc mentions 223, but there's some issues that exist between the console and WSL.exe that cause us to be limited to only 93. Alas. More details in https://github.com/microsoft/terminal/issues/5454#issuecomment-656250431
Author
Owner

@zadjii-msft commented on GitHub (Jun 16, 2022):

Sure enough, this works on Ubuntu 2204, so I bet an updated terminfo would help here as well.

/dup #9928

@zadjii-msft commented on GitHub (Jun 16, 2022): Sure enough, this works on Ubuntu 2204, so I bet an updated terminfo would help here as well. /dup #9928
Author
Owner

@ghost commented on GitHub (Jun 16, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jun 16, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17729