AltSnap icon indicating copy to clipboard operation
AltSnap copied to clipboard

Bug: Lower windows by middle clicking on title bars: Can't close Windows Terminal tabs

Open redactedscribe opened this issue 4 years ago • 6 comments

Windows Terminal displays its tabs on top of the title bar, thus making closing the tabs with a middle click impossible (with "Lower windows by middle clicking on title bars" enabled). Disabling the option immediately remedies the issue.

I should be able to blacklist it, but ideally AltDrag would be able to cope with windows that display like this (which I haven't seen done other than by Windows Terminal).

Thanks!

Windows Terminal 1.4.3243.0
Windows 10 20H2
AltDrag 1.32

redactedscribe avatar Jan 10 '21 23:01 redactedscribe

Yes, the blacklist should be active for the Lower action, I will see what I can do, because with metro-style applications many messages are not working, like the one AltDrag uses to determine if the click is on the titlebar.

I will try to fixit and if I cannot, I will add a specific lowerMMB blacklist. (just in the .ini file) so that you can specifically disable this behavior for any program.

RamonUnch avatar Jan 11 '21 10:01 RamonUnch

hooks.zip

The solution seems to be a simple blacklist. Use the above hooks.dll and add manualy MMBLower=*|CASCADIA_HOSTING_WINDOW_CLASS in the [Blacklist] section of AltDrag.ini (middle click on AltDrag Tray icon) enable and disable AltDrag and try again.

RamonUnch avatar Jan 13 '21 10:01 RamonUnch

Works! 🙂

redactedscribe avatar Jan 13 '21 14:01 redactedscribe

This is a bug of Windows terminal that actually does not respond properly to the WM_NCHITTEST message. https://github.com/microsoft/terminal/issues/8795

Maybe it will be fixed, but an other workaround could be to use the "showTabsInTitlebar": false setting for Windows Terminal Note that this would also fix the interaction of RollWithTBScroll with the normal scroll action of AltDrag. So it may take more space and be less appealiing to your eyes to have the titlebar separated from the tabs but it would solve those associated problems.

Again Microsoft will maybe fix this...

RamonUnch avatar Feb 14 '21 20:02 RamonUnch

Well Microsoft fixed the WM_NCHITTEST in the maximize button but it seems they will not fix the titlebar soon: https://github.com/microsoft/terminal/commit/ccc74686a28f4231355696d90a2e1f4b3be44a49

RamonUnch avatar Feb 21 '22 13:02 RamonUnch

Workaround:

Enable the title bar: title

Tabs and the shell now get flagged properly with WM_NCHITTEST=1

Ichisich avatar Jul 26 '22 12:07 Ichisich