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

Windows Terminal hides itself when minimizing other windows is issued #295

Closed
zhichaoh opened this issue Sep 12, 2022 · 13 comments · Fixed by #294
Closed

Windows Terminal hides itself when minimizing other windows is issued #295

zhichaoh opened this issue Sep 12, 2022 · 13 comments · Fixed by #294

Comments

@zhichaoh
Copy link

I found the windows terminal has troubles with "Minimizing other windows" behavior. It always minimize itself when such a action is issued. But similarly, the Windows + Home will correctly minimizing other windows in the same scenarios. The altsnap version is 1.56. The OS is Windows 11.

@zhichaoh zhichaoh changed the title Windows Terminal hide itself when minimizing other windows is issued Windows Terminal hides itself when minimizing other windows is issued Sep 12, 2022
@RamonUnch
Copy link
Owner

Interesting...
Does it happen when you perform the action while clicking on the titlebar?
I have an idea of what it might be, have a try with this build (you need to replace both AltSnap.exe and hooks.dll)

AltSnap1.57test12_x64.zip
AltSnap1.57test12_i386.zip

@zhichaoh
Copy link
Author

I tried the patch and still the same behavior (terminal itself is also minimized). Clicking on titlebar behave the same way (I.e. binding the action to one of the titlebar click). Actually, in windows terminal, you can hide/unhide title bar. I unhide the title bar and none of the actions I registered with title bar works. But they are all working fine (roll up/down, etc) for other apps. Unfortunately, the patch does not seem to fix the issue. Thanks.

@RamonUnch
Copy link
Owner

For titlebar specific actions, have a look at #11
Short story: If you keep the titlebar enabled in Windows Terminal, then you can remove it from the titlebar blacklist (MMBLower) in the AltSnap.ini file. Onceyou removed it from the titlebar blacklist you will be able too perform titelabr actions.
Window Terminal titlebar is blacklisted by default because unless you display it fully, it is buggy.

@Ichisich
Copy link

Can confirm, the terminal gets also minimized with a very short delay compared to the other windows.
The Terminal also has the quirk that it draws invisible borders on the desktop, which can mess up snapping.
The Terminal is the only program, to my knowledge, that shows this behavior.

@RamonUnch
Copy link
Owner

This version will show a popup before minimizing each other window.

AltSnap1.57test13_x64.zip

Just copy/paste the message box content that is just before the window treminal minimization (when it should not get minimized).
To copy the textual content of a message bow, just hit Ctrl+C after selecting the MessageBox, then when you paste you will see the whole content appear: ie:

---------------------------
Goinng to Minimize:
---------------------------
Hwnd=1230090/1230090, [hooks.c] - GreenPad|GreenPad MainWnd, style=14cf0000, xstyle=110
---------------------------
OK   
---------------------------

So just click on the Window Terminal window to minimize all other window and click and each new popup Hit Ctrl+C , then press OK, until the Window Terminal get minimized.

@Ichisich
Copy link

Ichisich commented Sep 13, 2022

With this build, the terminal is the first window that gets minimized and shows the following:

---------------------------
Goinng to Minimize:
---------------------------
Hwnd=40140/90510, |PseudoConsoleWindow, style=94cf0000, xstyle=80801a0
---------------------------
OK   
---------------------------

You would expect |CASCADIA_HOSTING_WINDOW_CLASS and not |PseudoConsoleWindow.

@RamonUnch
Copy link
Owner

Well I guess this |PseudoConsoleWindow is owned by the Window Terminal and minimizing it minimizes also the owner.
So have a try with this hooks.dll
hooks1.57test14_x64.zip

It will still display message boxes...

@Ichisich
Copy link

With test14 the terminal keeps up.
But windows on other virtual desktops get also minimized, and the terminal loses focus, although the latter is probably due to the message boxes.

@RamonUnch
Copy link
Owner

hooks1.57test15_x64.zip

Strange, it should not minimize windows from other virtual desktops. Does the 1.56 build have this problem too?
The above version does not display message boxes, otherwise should be Identical.

@Ichisich
Copy link

No, regular 1.56 doesn't, only the debug box message builds do.
They also change the Snap Gap.

Test15 fixes the focus loss, so it was just a message box thing.

@RamonUnch
Copy link
Owner

Ok, I think I git the problem, it is because I was experimenting with extra DWM flags and it messed up their numbering sequence.
AltSnap1.57test16_x64.zip
AltSnap1.57test16_i386.zip

@Ichisich
Copy link

Perfect, test16 respects virtual desktops, the snap gap is normal again, and it can handle the terminal in regard to minimizing other windows flawlessly.

@RamonUnch RamonUnch mentioned this issue Sep 13, 2022
@zhichaoh
Copy link
Author

I can confirm that latest zip (test16) solved all my issues with Windows Terminal. Actually, it is working more reliable than Win+Home as sometimes it brings a bottom explorer window on top when reversing the "minimizing other windows". But your latest fix does not exhibit this issue. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants