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

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

Open
redactedscribe opened this issue Jan 10, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@redactedscribe
Copy link

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
@RamonUnch
Copy link
Owner

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
Copy link
Owner

RamonUnch commented Jan 13, 2021

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.

@redactedscribe
Copy link
Author

Works! 🙂

@RamonUnch
Copy link
Owner

RamonUnch commented Feb 14, 2021

This is a bug of Windows terminal that actually does not respond properly to the WM_NCHITTEST message.
microsoft/terminal#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 RamonUnch reopened this Feb 14, 2021
@RamonUnch RamonUnch added the bug Something isn't working label Feb 20, 2021
@RamonUnch
Copy link
Owner

Well Microsoft fixed the WM_NCHITTEST in the maximize button but it seems they will not fix the titlebar soon: microsoft/terminal@ccc7468

@Ichisich
Copy link

Workaround:

Enable the title bar:
title

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants