Commit Graph

4 Commits

Author SHA1 Message Date
Boliang Zhang (from Dev Box)
fa3342d24c Workspaces v6: route native Launcher/WindowArranger through the settings service
Completes the caller integration so the protected store is the single source of
truth for the whole workspace lifecycle, not just the Editor.

- JsonUtils: add ReadWorkspacesFromService() (GetBlob -> parse the same UTF-8
  JSON -> WorkspacesListJSON::FromJson; NotFound -> empty; ServiceUnavailable ->
  legacy file fallback) and WriteWorkspacesToService() (ToJson -> Stringify ->
  PutBlob; ServiceUnavailable -> legacy file fallback).
- WorkspacesLauncher: read the workspace list and write back the
  last-launched-time update through the service (main.cpp + Launcher.cpp).
- WorkspacesWindowArranger: read the list through the service.
- WorkspacesLib links WorkspacesSettingsClient (native PTSettingsClient) so the
  EXEs resolve GetBlob/PutBlob.
- WorkspacesData: WorkspacesFile()/TempWorkspacesFile() now resolve to the
  user-writable %LocalAppData%\Microsoft\PowerToys\Workspaces folder — the
  no-service fallback location and the transient snapshot->editor temp handoff,
  matching the managed editor (FolderUtils.DataFolder). The protected store is
  reached only through the service.

This fixes the previously-broken save->launch loop (the native tools wrote/read a
different %ProgramData% path via direct IO, which would be denied under the
protected DACL and would not see Editor-saved data) and the snapshot->editor
handoff (temp file was in the protected folder).

Verified locally: WorkspacesLib + Launcher + WindowArranger + SnapshotTool build
clean in Debug AND Release (native NuGet restore via downloaded nuget.exe). The
service round-trip these wrap is already proven (verify-prototype 9/9; editor
harness 8/8) and they reuse the same PTSettingsClient + WorkspacesListJSON.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-29 01:06:12 +08:00
Laszlo Nemeth
89be43e15d [Workspaces] implement the move feature (#35480)
* [Workspaces] Add move functionality

* spell checker

* [Workspaces] Modify Arranger to move apps without launch

* moved ipc helper

* removed callback

* use LauncherStatus in WindowArranger

* wait for launching next app

* launch in a separate thread and protect by mutexes

* update app version in advance

* changed canceling launch

* increased waiting time

* Fix optional parameter load from json

* changed arranger waiting time

* additional waiting time for Outlook

* added app id

* ensure ids before launch

* set id in editor

* minor updates

* [Workspaces] Move: Get the nearest window when moving a window

* [Workspaces] convert optional boolean to enum to avoid json problems

* Handle case when the new Application Property "moveIfExists" does not exist

* Re-implementing app-window pairing for moving feature.

* spell checker

* XAML formatting

* Fixing bug: IPC message not arriving

* spell checker

* Removing app-level-setting for move app. Also fixed compiler errors due styling.

* Updating editor window layout

* Re-implementing window positioning UI elements

* XAML formatting

* Code review findings

* Code cleanup

* Code cleanup

* Code cleanup

* code cleanup

* Code cleanup

* Code cleanup

* fix Move attribute after launch and snapshot

* Extend WindowArranger with PWA functionality to detect different PWA apps. PwaHelper moved to the common library

* fix repeat counter in the editor

* Code optimization

* code cleanup, optimization

* fix double-processing window

---------

Co-authored-by: Seraphima <zykovas91@gmail.com>
Co-authored-by: donlaci <donlaci@yahoo.com>
2024-12-04 18:17:54 +01:00
Seraphima Zykova
9994fd7715 [Workspaces] Sequential launch (#35297) 2024-10-14 15:51:02 +02:00
Seraphima Zykova
1e18e83af6 [Workspaces] Handle admin windows repositioning. (#34965) 2024-09-25 11:13:38 +02:00