microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.93k stars 8.22k forks source link

Bug: Quake mode (globalSummon) animation with dropdownDuration=0 #11381

Open NotWearingPants opened 2 years ago

NotWearingPants commented 2 years ago

Windows Terminal version (or Windows build number)

1.10.2383.0

Other Software

Windows 1909 (build 18363), might be relevant for repro since it's about the actual window.

Steps to reproduce

Add the following action to settings.json under "actions":

{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake", "dropdownDuration": 0 } },

First press Win+` to launch the quake window.

Then press it again to hide, and another time to show the quake window, and notice the show/hide animations.

Expected Behavior

Both the hide and show animations should be instant, no animation should play and the window should appear and disappear instantly.

Actual Behavior

The hide animation works as expected, but the show animation is no longer a reveal from above but rather a zoom out and pan (to top left) for some reason.

Changing "dropdownDuration" to 1 instead of 0 works as expected, a workaround.

If it doesn't repro for you, perhaps the Windows version is important.

zadjii-msft commented 2 years ago

Do you have your taskbar on the top or left?

IIRC that "zoom and pan" animation is just the normal windows "hide window" animation. That being said, I don't see those on Win11 with my

        {
            "command": 
            {
                "action": "globalSummon",
                "monitor": "any"
            },
            "keys": "win+sc(41)"
        },

keybinding, so maybe there's something that did change from 10->11

NotWearingPants commented 2 years ago

Your keybinding doesn't set dropdownDuration to 0, which is the only time the bug happens

My taskbar is on the bottom btw. The pan & zoom directions are affected by the taskbar location, but the animation still exists on all four sides

zadjii-msft commented 2 years ago

https://github.com/microsoft/terminal/blob/37e8769b3706402706d62f19202554080796b3e3/src/cascadia/TerminalSettingsModel/ActionArgs.h#L1641

the default dropdown duration is 0, so you don't actually need to explicitly set it to 0

NotWearingPants commented 2 years ago

Yeah, leaving it unset gives the same result.

I'd guess that this part of the code is the culprit. I did not disable animations in the OS settings btw. https://github.com/microsoft/terminal/blob/74f11b8203a3f297372630e164b7b4d51f82d83e/src/cascadia/WindowsTerminal/IslandWindow.cpp#L1381-L1395