[PR #6139] [MERGED] Add support for --fullscreen, --maximized #26581

Open
opened 2026-01-31 09:16:57 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6139
Author: @zadjii-msft
Created: 5/22/2020
Status: ✅ Merged
Merged: 6/1/2020
Merged by: @undefined

Base: master ← Head: dev/migrie/f/--fullscreen


📝 Commits (10+)

  • 46e5196 Make sure to update the maximize button's visual state on launch
  • 16e047f This works but the code is dirty, so I'll clean it up next
  • f1f4e44 Code cleanup for review
  • 9703212 Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen
  • ac08b7c remove dead code
  • 6329bd6 Revert "Make sure to update the maximize button's visual state on launch"
  • 3b5d7c5 Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen
  • 9aa4c1a fix up the vcxproj files
  • 5cc6a62 Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen
  • 2b11604 Lets just move these boys up a level, to Applogic, first

📊 Changes

9 files changed (+160 additions, -129 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+1 -1)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.cpp (+24 -0)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.h (+4 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+108 -14)
📝 src/cascadia/TerminalApp/AppLogic.h (+3 -0)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+6 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+10 -103)
📝 src/cascadia/TerminalApp/TerminalPage.h (+4 -7)
📝 src/cascadia/TerminalApp/TerminalPage.idl (+0 -4)

📄 Description

Summary of the Pull Request

Adds two new flags to the wt.exe alias:

  • --maximized,-M: Launch the new Terminal window maximized. This flag cannot be combined with --fullscreen.
  • --fullscreen,-F: Launch the new Terminal window fullscreen. This flag cannot be combined with --maximized.

References

  • This builds on the work done in #6060.
  • The cmdline args megathread: #4632

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • I had to move the commandline arg parsing up a layer from TerminalPage to AppLogic, because AppLogic controls the Terminal's settings, including launch mode settings. This seems like a reasonable change, to put both the settings from the file and the commandline in the same place.

    • Most of the diff is that movement of code
  • "What happens when you try to pass both flags, like wtd -M -F new-tab?":
    image

Validation Steps Performed

  • Ran a bunch of commandlines to see what happened.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/6139 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/22/2020 **Status:** ✅ Merged **Merged:** 6/1/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/f/--fullscreen` --- ### 📝 Commits (10+) - [`46e5196`](https://github.com/microsoft/terminal/commit/46e51966467b8fa345f6d59f4270f269294482d9) Make sure to update the maximize button's visual state on launch - [`16e047f`](https://github.com/microsoft/terminal/commit/16e047f41e7aa5999c63af2d591a62d066b27473) This works but the code is dirty, so I'll clean it up next - [`f1f4e44`](https://github.com/microsoft/terminal/commit/f1f4e44e7acd3ef6cb4be1346854bb2911592683) Code cleanup for review - [`9703212`](https://github.com/microsoft/terminal/commit/97032122be9038047395940eb5295ba0b9e4f43f) Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen - [`ac08b7c`](https://github.com/microsoft/terminal/commit/ac08b7c95486747437d1ba1d43ade737d025013c) remove dead code - [`6329bd6`](https://github.com/microsoft/terminal/commit/6329bd6923b5e35db8b1d015d0fa70da9a614b68) Revert "Make sure to update the maximize button's visual state on launch" - [`3b5d7c5`](https://github.com/microsoft/terminal/commit/3b5d7c55700d1865ebaf8d8eede73ef66f9c9838) Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen - [`9aa4c1a`](https://github.com/microsoft/terminal/commit/9aa4c1aeabc70690553f681baccf4779495c81a0) fix up the vcxproj files - [`5cc6a62`](https://github.com/microsoft/terminal/commit/5cc6a62843241ec0287d68f5f8f0721c87f2d433) Merge remote-tracking branch 'origin/master' into dev/migrie/f/288-launchMode-fullscreen - [`2b11604`](https://github.com/microsoft/terminal/commit/2b11604bfff14b83911c98f36714a79852f5dff7) Lets just move these boys up a level, to Applogic, first ### 📊 Changes **9 files changed** (+160 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.cpp` (+24 -0) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.h` (+4 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+108 -14) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+3 -0) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+6 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+10 -103) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+4 -7) 📝 `src/cascadia/TerminalApp/TerminalPage.idl` (+0 -4) </details> ### 📄 Description ## Summary of the Pull Request Adds two new flags to the `wt.exe` alias: * `--maximized,-M`: Launch the new Terminal window maximized. This flag cannot be combined with `--fullscreen`. * `--fullscreen,-F`: Launch the new Terminal window fullscreen. This flag cannot be combined with `--maximized`. ## References * This builds on the work done in #6060. * The cmdline args megathread: #4632 ## PR Checklist * [x] Closes #5801 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments * I had to move the commandline arg parsing up a layer from `TerminalPage` to `AppLogic`, because `AppLogic` controls the Terminal's settings, including launch mode settings. This seems like a reasonable change, to put both the settings from the file and the commandline in the same place. - **Most of the diff is that movement of code** * _"What happens when you try to pass both flags, like `wtd -M -F new-tab`?"_: ![image](https://user-images.githubusercontent.com/18356694/82679939-3cffde00-9c11-11ea-8d88-03ec7db83e59.png) ## Validation Steps Performed * Ran a bunch of commandlines to see what happened. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:16:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26581