Fix panel close throwing on read-only centerHoverRevealSuppressed - #8
Closed
DerailleurAgile wants to merge 1 commit into
Closed
DerailleurAgile wants to merge 1 commit into
DerailleurAgile wants to merge 1 commit into
Conversation
A recent Omarchy upgrade (4.0.3-1) changed the shell's bar API: centerHoverRevealSuppressed moved from a writable property to readonly, mutable only via bar.setCenterHoverRevealSuppressed(). This plugin still wrote the property directly, which now throws a TypeError. Since that call ran before root.controller.hide() inside close(), the panel never hid -- it stayed open holding keyboard focus (keyCatcher.forceActiveFocus() from open()), locking up keyboard input for the session. Matches the fix Omarchy's own stock weather/clock panels already carry for the same upgrade: try the method, fall back to the legacy property for older shells. Fixes salemsayed#7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114NmAoUj6rcpi6z4GM5FHx
Owner
|
The panel setter fix is included in v1.6.0 through #5, which also hides the panel before touching the bar API so an API error cannot retain keyboard focus. Verified on an Omarchy 4.0.3 QEMU desktop with Escape, outside click, bar click, IPC close/toggle, and keyboard focus restoration. Closing this overlapping implementation as superseded; thank you for the fix and diagnosis. Release: https://github.com/salemsayed/omaonedrive/releases/tag/v1.6.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7.
A recent Omarchy upgrade (currently 4.0.3-1) changed the shell's bar API:
centerHoverRevealSuppressedmoved from a writable property toreadonly, mutable only viabar.setCenterHoverRevealSuppressed(). This plugin still writes the property directly, which now throws aTypeError. Since that call runs beforeroot.controller.hide()insideclose(), the panel never hides — it stays open holding keyboard focus (keyCatcher.forceActiveFocus()fromopen()), locking up keyboard input for the session. Nothing changed on the plugin side; this is purely fallout from the platform upgrade.Matches the fix Omarchy's own stock
weather/clockpanels already carry for the same upgrade: try the method, fall back to the legacy property for older shells.function setCenterHoverRevealSuppressed(value) { - if (root.bar && "centerHoverRevealSuppressed" in root.bar) + if (root.bar && typeof root.bar.setCenterHoverRevealSuppressed === "function") + root.bar.setCenterHoverRevealSuppressed(value) + else if (root.bar && "centerHoverRevealSuppressed" in root.bar) root.bar.centerHoverRevealSuppressed = value }Testing:
TypeError: Cannot assign to read-only property "centerHoverRevealSuppressed"injournalctl --useron every panel close, only after upgrading to Omarchy 4.0.3-1 — not reproducible on the older shell API.omarchy restart shell(hot-reload/rescanPluginsdidn't pick up the change to this panel — worth a note for other contributors), cycledopen/close/toggle/toggleover IPC (omarchy-shell io.github.salemsayed.omaonedrive ...) with no warnings in the journal.🤖 Generated with Claude Code
https://claude.ai/code/session_0114NmAoUj6rcpi6z4GM5FHx