[1.21 canary] Session restore is restoring to the wrong screen coordinates and window size #21478

Closed
opened 2026-01-31 07:45:51 +00:00 by claunia · 1 comment
Owner

Originally created by @zadjii-msft on GitHub (Apr 3, 2024).

Originally assigned to: @zadjii-msft on GitHub.

Seems like we're off by a DPI scaling factor somewhere?

image

settings

    "firstWindowPreference": "persistedWindowLayout",
    "initialCols": 80,
    "initialPosition": "-128,383",
    "initialRows": 24,
    "launchMode": "default",

state:

	"persistedWindowLayouts" : 
	[
		{
			"initialSize" : 
			{
				"height" : 896.0,
				"width" : 1407.0
			},
			"launchMode" : "default",
			"tabLayout" : 

oops no initialPosition

Originally created by @zadjii-msft on GitHub (Apr 3, 2024). Originally assigned to: @zadjii-msft on GitHub. Seems like we're off by a DPI scaling factor somewhere? ![image](https://github.com/microsoft/terminal/assets/18356694/81facd8e-f89f-4956-bd17-a3ee145f771c) `settings` ```json "firstWindowPreference": "persistedWindowLayout", "initialCols": 80, "initialPosition": "-128,383", "initialRows": 24, "launchMode": "default", ``` `state`: ```json "persistedWindowLayouts" : [ { "initialSize" : { "height" : 896.0, "width" : 1407.0 }, "launchMode" : "default", "tabLayout" : ``` oops no `initialPosition`
Author
Owner

@zadjii-msft commented on GitHub (Apr 15, 2024):

https://github.com/microsoft/terminal/pull/16598#discussion_r1511519304

Looks like AppHost::_GetWindowLaunchPosition is never called

@zadjii-msft commented on GitHub (Apr 15, 2024): https://github.com/microsoft/terminal/pull/16598#discussion_r1511519304 Looks like `AppHost::_GetWindowLaunchPosition` is never called
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21478