Skip to content

Fix popup dismissal on Omarchy 4.0.3 - #4

Open
lutfi-zain wants to merge 1 commit into
salemsayed:mainfrom
lutfi-zain:fix/omarchy-4-0-3-popup-dismiss
Open

Fix popup dismissal on Omarchy 4.0.3#4
lutfi-zain wants to merge 1 commit into
salemsayed:mainfrom
lutfi-zain:fix/omarchy-4-0-3-popup-dismiss

Conversation

@lutfi-zain

Copy link
Copy Markdown

Problem

On Omarchy 4.0.3, clicking the OmaPrayers bar widget causes the desktop to freeze: once opened, the panel cannot be collapsed or dismissed (clicking outside or pressing Escape does nothing), and all desktop click interactions are trapped by the fullscreen layer-shell overlay.

Cause

Omarchy 4.0.3 changed the third-party plugin interface (PluginBarApi) by turning bar.centerHoverRevealSuppressed into a readonly property and introducing the setter method bar.setCenterHoverRevealSuppressed(value).

In Panel.qml:

function setCenterHoverRevealSuppressed(value) {
  if (root.bar && "centerHoverRevealSuppressed" in root.bar)
    root.bar.centerHoverRevealSuppressed = value
}

Directly assigning to root.bar.centerHoverRevealSuppressed throws TypeError: Cannot assign to read-only property "centerHoverRevealSuppressed". When close() runs:

function close() {
  setCenterHoverRevealSuppressed(false)
  root.controller.hide()
}

The unhandled exception aborts execution before root.controller.hide() is called, leaving the overlay active and capturing all cursor/pointer events across the screen.

Solution

Prefer calling root.bar.setCenterHoverRevealSuppressed(value) when available, and fall back to the direct property assignment on older Omarchy shells, matching the first-party clock and weather panels in Omarchy Quattro:

function setCenterHoverRevealSuppressed(value) {
  if (root.bar && typeof root.bar.setCenterHoverRevealSuppressed === "function")
    root.bar.setCenterHoverRevealSuppressed(value)
  else if (root.bar && "centerHoverRevealSuppressed" in root.bar)
    root.bar.centerHoverRevealSuppressed = value
}

Verification

  • omarchy plugin validate . passed.
  • tests/run passed (all 12 engine scenarios, 54 model scenarios, AlAdhan snapshot tests, and engine QML parity tests).
  • Verified live under Omarchy 4.0.3: panel opens and collapses cleanly on outside clicks, re-clicking the bar button, and pressing Escape.

Omarchy 4.0.3 made bar.centerHoverRevealSuppressed a read-only property
on PluginBarApi and added a bar.setCenterHoverRevealSuppressed() setter
method. Directly assigning to the property now throws a TypeError, which
aborts open() and close() before reaching controller.show() / hide(),
leaving the fullscreen layer-shell overlay trapped and unable to collapse.

Prefer the setter method and keep property assignment as a fallback for
older shells, matching the first-party clock and weather panels.
@Rizmi

Rizmi commented Sep 11, 2026

Copy link
Copy Markdown

nice, needed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants