Repository: microsoft/terminal (language: cpp)

Issue:
Using coordinates terminal window not positioned as intended by user
### Windows Terminal version

main 43dbbd5

### Windows build number

10.0.19044.0

### Other Software

_No response_

### Steps to reproduce

- build terminal with commit 43dbbd590 included
- set `Center on launch` is SUI
- start terminal with `wtd.exe --pos 100,100`

### Expected Behavior

- terminal to be closer  to the upper left corner (x=100, y=100)

### Actual Behavior

- terminal window is centered


Discussion / hints:
Thanks for the report!
The interplay between these options is complicated.

When `center on launch` is set, the position is used to determine _which monitor_ to center on. If you have multiple monitors, and you set `X = -1` + `Center`, Terminal will be launched in the center of the monitor to the left of primary.

This is poorly explained, but it is by design.
To be fair, perhaps this position specified on the command line should override the center option.
/cc @ianjoneill 

Fix patch:
diff --git a/src/cascadia/TerminalApp/AppLogic.cpp b/src/cascadia/TerminalApp/AppLogic.cpp
index a4279620833..7062bfd73a9 100644
--- a/src/cascadia/TerminalApp/AppLogic.cpp
+++ b/src/cascadia/TerminalApp/AppLogic.cpp
@@ -762,7 +762,8 @@ namespace winrt::TerminalApp::implementation
             // Load settings if we haven't already
             LoadSettings();
         }
-        return _settings.GlobalSettings().CenterOnLaunch();
+        // If the position has been specified on the commandline, don't center on launch
+        return _settings.GlobalSettings().CenterOnLaunch() && !_appArgs.GetPosition().has_value();
     }
 
     winrt::Windows::UI::Xaml::ElementTheme AppLogic::GetRequestedTheme()


Test patch: