mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.12k stars 104 forks source link

Resizing maximized by dragging title bar blanks display in vim #208

Closed sliverstorm closed 4 years ago

sliverstorm commented 5 years ago

wsltty nicely handles resizing via minimize, maximize, and dragging the corners. However on Windows 10 when I drag a maximized window by the title bar, resizing it back to a floating window, and/or maximize a floating window by snapping it to the upper edge of the screen, the display does not redraw and is corrupted. The only fix is to resize the window via one of the other "good" methods I described. This can easily be seen with a vim session or tmux.

I'm guessing wsltty has the capability, but that maximizing or un-maximizing in these ways throws a slightly different event that wsltty is not monitoring.

sliverstorm commented 5 years ago

I originally ran into this issue on a dual monitor setup, where I wanted to drag a maximized wsltty from one monitor to the other. The process is to grab by the title bar & drag, which un-maximizes, and then snap to the upper border on the other monitor, which re-maximizes.

Biswa96 commented 5 years ago

the display does not redraw and is corrupted.

This seems to be mintty issue https://github.com/mintty/mintty/issues/82. But I am not sure about it. wsltty is composed of mintty (the terminal) and wslbridge/2 (the backend). wslbridge2 only reports if there is any change in window size.

sliverstorm commented 5 years ago

The corruption takes different forms but when I move the maximized window from one screen to the other screen, via dragging the title bar, it winds up blank. (at least with tmux running)

mintty commented 5 years ago

Works here on Windows Version 1809 (which does not support different DPI for multiple monitors yet). What are the DPI/scaling values of your monitors?

mintty commented 5 years ago

On Windows Version 1903 (but only one monitor), I can drag the window between full-screen and normal and back, everything looks good. Maybe you can provide a screenshot?

sliverstorm commented 5 years ago

maximized on left screen maximized on left screen

dragging by the title bar dragging by the title bar

snapped to maximize on right display snapped to maximize on right display

Now that I am doing more experiments it looks like it happens anytime I'm using mosh, and only when I'm in vim using ssh. If I'm at a command prompt in ssh it works OK. It's also broken for local vim, but fine for local command prompt as well.

I'm on Win10 18362 and my dpi scaling is 100% on both monitors.

mintty commented 5 years ago

Please try to create a minimal test case. You've taken out ssh already. Can you produce it without mosh? Can you reproduce it in cygwin, without WSL? What's the exact sequence? (WSL, which distro, running mosh, then vim, then maximize, ...?) Finally, please make a screen log. (Not screenshot this time.)

mintty commented 5 years ago

I've tried to adjust the issue title to the symptoms. Could also be a reaction of vim to some unexpected event, e.g. a sequence of SIGWINCH signals, or a mintty focus notification if enabled. Additional diagnostics is needed.

mintty commented 5 years ago

Tried with WSL + tmux + vi. No problems. Intending to close.