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

When the window is summoned and is already active, minimize it. #9963

Merged
merged 109 commits into from
Apr 28, 2021

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Apr 26, 2021

This adds a toggleVisibility parameter to globalSummon.

  • When true (default): when you press the global summon keybinding, and the window is currently the foreground window, we'll minimize the window.
  • When false, we'll just do nothing.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

I've got nothing extra to add here. This one's pretty simple. I'm only targeting #9954 since that one laid so much foundation to build on, with the SummonBehavior

Validation Steps Performed

Played with this for a while, and it's amazing.

…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
…ndow should be. It just always says 0 for now, but in the future it could actually give us useful info.
@DHowett
Copy link
Member

DHowett commented Apr 28, 2021

tfw this pr has 2 signoffs but #9954 before it has none, and #9854 before that one only has one

small atomic PRs are nice and easy 😉

@DHowett DHowett force-pushed the dev/migrie/f/quake-toCurrent-desktop branch from 6c424f7 to fe51444 Compare April 28, 2021 22:19
@DHowett DHowett force-pushed the dev/migrie/f/quake-toggleVisibility branch from 387d675 to 04752e5 Compare April 28, 2021 22:22
Base automatically changed from dev/migrie/f/quake-toCurrent-desktop to main April 28, 2021 22:25
(cherry picked from commit d3297bdc8740410e9c73c1cc15d5aa9fb5d2f109)
@DHowett DHowett force-pushed the dev/migrie/f/quake-toggleVisibility branch from 04752e5 to 1032dbb Compare April 28, 2021 22:26
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 28, 2021
@ghost
Copy link

ghost commented Apr 28, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett
Copy link
Member

DHowett commented Apr 28, 2021

I'm fixing the x86 leg break

{
VERIFY_IS_TRUE(false, L"We shouldn't need GetWindowDesktopId in the tests.");
return E_FAIL;
}
HRESULT IsWindowOnCurrentVirtualDesktop(HWND topLevelWindow, BOOL* onCurrentDesktop)
IFACEMETHOD(IsWindowOnCurrentVirtualDesktop)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes clang-format did this no i don't like it but oh well

@github-actions
Copy link

Misspellings found, please review:

  • IFACEMETHOD
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my @expect_files=qw('".github/actions/spelling/expect/alphabet.txt
.github/actions/spelling/expect/expect.txt
.github/actions/spelling/expect/web.txt"');
@ARGV=@expect_files;
my @stale=qw('"aef aspnet boostorg BSODs Cac COINIT dahall DEFCON developercommunity fde fea fmtlib hotkeys HPCON isocpp llvm mintty msvcrtd Nc NVDA pinam QOL remoting UNINIT Unk unte vcrt what3words xamarin "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect/65b22b9abba26fa94150505cee4444dcb4e42182.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling/expect";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"cac coinit hpcon IFACEMETHOD LLVM MSVCRTD nc Remoting uninit unk "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd
✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

⚠️ The command is written for posix shells. You can copy the contents of each perl command excluding the outer ' marks and dropping any '"/"' quotation mark pairs into a file and then run perl file.pl from the root of the repository to run the code. Alternatively, you can manually insert the items...

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/dictionary/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/dictionary/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the .github/actions/spelling/excludes.txt file instead of just accepting the garbage.

File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

@DHowett DHowett removed the AutoMerge Marked for automatic merge by the bot when requirements are met label Apr 28, 2021
@DHowett DHowett merged commit 30d2d2c into main Apr 28, 2021
@DHowett DHowett deleted the dev/migrie/f/quake-toggleVisibility branch April 28, 2021 23:57
@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal Preview v1.9.1445.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants