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

Add sticky monitor workspaces to the core #1071

Merged
merged 25 commits into from
Nov 10, 2024
Merged

Add sticky monitor workspaces to the core #1071

merged 25 commits into from
Nov 10, 2024

Conversation

dalyIsaac
Copy link
Owner

@dalyIsaac dalyIsaac commented Nov 9, 2024

This PR includes changes to add sticky monitor workspaces to Whim's core.

Sticky Monitor Workspaces

The IMapSector now has two new dictionaries:

  • StickyWorkspaceMonitorIndexMap - a dictionary that maps workspaces to the monitor indices they are sticky to.
  • WorkspaceLastMonitorMap - a dictionary that maps a workspace to the last monitor it was on.

These are used to store and determine which monitors workspace can be displayed on.

Saved workspaces will regain their sticky monitor indices during startup, via the CoreSavedStateManager.

Code Clean-up and Improvements

  • IWindowManager.CreateWindow has been replaced by IContext.CreateWindow.
  • Replaced some references to the legacy API.
  • Reduced the build time for local development by reducing code generation occurrences.

@dalyIsaac dalyIsaac added enhancement New feature or request core Whim labels Nov 9, 2024
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 94.06393% with 13 lines in your changes missing coverage. Please review.

Project coverage is 80.52%. Comparing base (09f8cd3) to head (43d544c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/Whim/Store/MapSector/MapPickers.cs 96.15% 1 Missing and 3 partials ⚠️
...Sector/Transforms/InitializeWorkspacesTransform.cs 93.18% 2 Missing and 1 partial ⚠️
src/Whim/Context/Context.cs 0.00% 2 Missing ⚠️
src/Whim.Bar/BarWindow.xaml.cs 0.00% 1 Missing ⚠️
src/Whim/Context/CoreSavedStateManager.cs 94.44% 0 Missing and 1 partial ⚠️
src/Whim/Native/WindowExtensions.cs 0.00% 1 Missing ⚠️
...MapSector/Transforms/ActivateWorkspaceTransform.cs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1071      +/-   ##
==========================================
+ Coverage   80.38%   80.52%   +0.14%     
==========================================
  Files         283      283              
  Lines       12495    12655     +160     
  Branches     1440     1458      +18     
==========================================
+ Hits        10044    10191     +147     
- Misses       2267     2274       +7     
- Partials      184      190       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dalyIsaac dalyIsaac marked this pull request as ready for review November 10, 2024 02:51
@dalyIsaac dalyIsaac merged commit 1fe72a1 into main Nov 10, 2024
8 checks passed
@dalyIsaac dalyIsaac deleted the sticky-monitor-core branch November 10, 2024 03:08
@dalyIsaac dalyIsaac linked an issue Nov 11, 2024 that may be closed by this pull request
31 tasks
@dalyIsaac dalyIsaac mentioned this pull request Nov 11, 2024
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Whim enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sticky monitor workspaces
1 participant