refactor(core,kde,windows,mac): remove CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL

All three daemons now let the pointer pick the monitor for every shared
command that has the preamble, so the const has no reason left. The
shared functions always call focus_the_monitor_under_the_pointer; the
three CommandHost impls lose the const (Windows had it true already, so
nothing changes there). The core test of the switch becomes
the_pointer_picks_the_monitor_..._on_all_platforms. known-issues item 1
is marked resolved and core-model.md section 18 text is updated.

No behaviour change in this revision beyond the previous two.
Verified: komorebi-core tests all pass (command tests 18); KDE cargo test
-p komorebi-linux 670 passed, 0 failed; fake-CC clippy for the four macOS
packages passes; cargo clippy -p komorebi-windows --all-targets -D warnings
passes. Not verified: Windows tests or e2e (cannot run on Linux).
This commit is contained in:
LGUG2Z committed 2026-11-05 15:03:26 -08:00
1 parent 24d083bce8
commit 3e5475e7ef
7 files changed
+19 -124

No files matched your search

+2 -2
View File
@@ -1390,8 +1390,8 @@ monitors (`CycleMoveContainerToWorkspace`, `CycleSendContainerToWorkspace`, `Cyc
`CycleMoveContainerToMonitor`, `CycleSendContainerToMonitor`, `FocusMonitorWorkspaceNumber`,
`MoveContainerToMonitorWorkspaceNumber`, `SendContainerToMonitorWorkspaceNumber`) and the lock and
unlock of a container by index. The one platform difference found, that Windows lets the pointer pick the
monitor first for the empty, close and last-workspace commands (a probable omission on KDE and macOS,
section 18), is the const `CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL`, true only for Windows.
monitor first for the empty, close, last-workspace and workspace-number commands (an omission on KDE and macOS,
section 18), is gone: all three do it now (wip-u-ptr), so the const that held the difference was removed.
**What stays, and why** (identical across the three unless noted; each needs a `WindowManager` method
or field, so moving them means moving `WindowManager`, the blockers of section 18):
+3 -1
View File
@@ -2,7 +2,9 @@
Findings of the consolidation reviews and tests that are NOT fixed because whether they are bugs, or how to fix them, is a decision for the owner. Each has the evidence, why it may or may not be a bug, the platforms, and a proposed fix. Paths are relative to the repository root at the time of writing and may have moved.
## 1. KDE FocusWorkspaceNumber, FocusWorkspaceNumbers and FocusLastWorkspace skip the pointer-monitor preamble
## 1. RESOLVED (wip-u-ptr): KDE FocusWorkspaceNumber, FocusWorkspaceNumbers and FocusLastWorkspace skipped the pointer-monitor preamble
- **Resolution**: the owner approved Windows behaviour for all platforms. The preamble now runs for all three daemons in the shared `komorebi_core::command` functions (`focus_workspace_number`, `focus_workspace_numbers`, `focus_last_workspace`, and the others). KDE is covered by `komorebi-for-kde/komorebi/tests/pointer_monitor.rs`, core by `crates/komorebi-core/tests/commands.rs`. Owed: KDE VM commands and workspace-switch, macOS hand check H1 (docs/dev/macos-handcheck.md). The text below is the original finding.
- **Evidence**: komorebi-for-kde/komorebi/src/process_command.rs lines 1245-1277: the arms for the three messages call `focus_workspace` on the focused monitor directly. The Windows daemon (komorebi/src/process_command.rs:972-987 for `FocusWorkspaceNumber`, and lines about 2185 and 2215 for the helpers behind `FocusLastWorkspace` and `FocusWorkspaceNumbers`) first checks `monitor_idx_from_current_pos()`: when the pointer is on another monitor whose focused workspace is empty, that monitor becomes the focused one. KDE has the same preamble only in `cycle_focus_workspace` (line 897-909).
- **Why it may be a bug**: on a secondary monitor with an empty workspace and the pointer on it, `focus-workspace 2` switches the workspace of the monitor that was focused before, not the one the user is pointing at, unlike on Windows and unlike KDE's own `cycle-focus-workspace`. **Why not**: KWin may not report an empty monitor as pointed at the same way; the KDE tests do not cover it, so it may have been left out on purpose.