mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 06:11:21 +01:00
refactor(mac): the pointer picks the monitor for the workspace commands
BEHAVIOUR (macOS): FocusWorkspaceNumber, FocusWorkspaceNumbers and FocusLastWorkspace now focus the display under the pointer first when its workspace is empty, then run the workspace command, as on Windows and (since the previous revision) KDE. Done by setting CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL to true in the macOS CommandHost impl. Adds hand-check row H1 to docs/dev/macos-handcheck.md. Verified: fake-CC cargo clippy --all-targets -D warnings on aarch64-apple-darwin for the four macOS packages passes. Not verified: nothing ran on a Mac. Gate owed: macOS hand check H1.
This commit is contained in:
1 parent
51dca808b0
commit
24d083bce8
2 files changed
+9
No files matched your search
@@ -164,3 +164,9 @@ Type-check and clippy only; nothing here ran on a Mac. The settings now live in
|
||||
1. **S3 groups (paddings, floating aspect ratio, `layout_defaults`, `display_index_preferences`).** Config with `default_workspace_padding` 20 and `default_container_padding` 15: tiles 20 px from the work area, 15 apart. Reload with the key dropped: padding stays (merge); set it to 5 and reload: 5. `layout_defaults`: set, reload, workspaces use it; remove and reload: they fall back (the key resets). Aspect ratio: `toggle-float` with centring uses the configured ratio; remove the key and reload: 4:3 (Standard). `display_index_preference 0 <serial>`: monitor order follows it. Reload during a drag or workspace switch: no one-frame flash of half-new padding.
|
||||
2. **S5 animation (BEHAVIOUR: one snapshot for enabled, duration, style and fps).** Animation on (`komorebic animation true`), switch workspace: transition plays. While a transition runs, `komorebic animation-duration 1000`, then `animation-style`, then `animation false`: the running transition is not torn (no mix of old duration with new style), the next one follows the new values. Per-kind: `animation true --movement`, `animation false` (global): per-kind values are cleared by a global value, so movement is off again. Reload a file with `"animation": {"enabled": {"movement": true}}`: only movement animates and the global flag is untouched; reload a file with `"animation": {"enabled": true}` (no fps): fps back to 60; reload a file with no animation block: all animation settings keep their values. `komorebic animation-fps 30` then watch frame cadence. Stack a window (`stack`): no animation during the stack (the `suspend()` counter, unchanged), and animation is back after it, including after a stack command that fails.
|
||||
3. The border and transparency groups (S6, S4) are not moved on macOS: transparency does not exist there.
|
||||
|
||||
## H. Pointer picks the monitor (wip-u-ptr), appended by the KDE agent
|
||||
|
||||
Type-check and clippy only (fake CC); nothing here ran on a Mac.
|
||||
|
||||
1. **Pointer on an empty workspace of another monitor (BEHAVIOUR).** With two displays, an empty workspace on the second display and the pointer over it while the first display is focused: `komorebic focus-workspace 1`, `komorebic focus-workspaces 1` and `komorebic focus-last-workspace` first focus the display under the pointer, then switch its workspace (before, `focus-workspace` and `focus-workspaces` acted on the focused display). With the pointer on the focused display nothing changes.
|
||||
@@ -1732,6 +1732,9 @@ impl komorebi_core::CommandHost for WindowManager {
|
||||
WindowManager::focus_workspace(self, idx)
|
||||
}
|
||||
|
||||
// the pointer picks the monitor, as on Windows (docs/dev/known-issues.md item 1)
|
||||
const POINTER_PICKS_THE_MONITOR_FOR_ALL: bool = true;
|
||||
|
||||
fn show_workspace_on(&mut self, monitor_idx: usize, workspace_idx: usize) -> eyre::Result<()> {
|
||||
let monitor = self
|
||||
.monitors_mut()
|
||||
|
||||
Reference in new issue
Block a user