#3.5 Fix popout opening blocked by MouseArea event consumption #10
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: PRD #1 (Tailscale Widget Plugin for Dank Bar)
Type: AFK
Blocked by: #3 (merged)
Blocks: #5, #6, #7
Problem
After implementing the popout skeleton (issue #5), left-clicking the widget does not open the popout. The only observable behavior is that focus is lost from the current window — the
PluginComponentnever receives the left-click event.Root Cause
The
horizontalBarPillandverticalBarPilleach contain aMouseAreathat wraps the entire pill content. Even thoughacceptedButtonsis set toQt.RightButtonalone, QML'sMouseAreastill intercepts left-click events and consumes them, preventing the event from bubbling up toPluginComponent.PluginComponentrequires a left-click to open itspopoutContent, but it never sees the event.Fix Strategy
Update both
MouseAreablocks to:propagateComposedEvents: trueQt.RightButton | Qt.LeftButtononClicked, checkmouse.button:Qt.RightButton→ calltoggleTailscale(), setmouse.accepted = trueQt.LeftButton→ setmouse.accepted = falseso the event propagates toPluginComponentThis is a single-file change to
TailscaleWidget.qmland requires no new permissions, imports, or infrastructure.Acceptance Criteria
popoutContentflyoutPLUGIN_RELOAD_SUCCESS)Slice #3.5 complete.
Fix: Updated both
horizontalBarPillandverticalBarPillMouseArea blocks:acceptedButtons: Qt.RightButton | Qt.LeftButtonpropagateComposedEvents: trueonClickedchecksmouse.button— right = toggle + accept, left = propagate (mouse.accepted = false)Verification: Plugin reloads cleanly (PLUGIN_RELOAD_SUCCESS, status = loaded).
Depends updated: #5, #6, #7 now list this as a blocking dependency.
Reopening — previous fix (propagateComposedEvents) did not work. New fix applied:
Removed the wrapping MouseArea from bar pill Components. Replaced with Item + child MouseArea that only accepts Qt.RightButton. Left-click passes through the MouseArea (not an accepted button) and reaches PluginComponent, which opens the popout naturally.
Verification: PLUGIN_RELOAD_SUCCESS, status = loaded. Needs user to confirm left-click opens popout.
The issue was resolved by adding a root-level MouseArea at the PluginComponent level (sibling to BasePill) with acceptedButtons: Qt.RightButton. This ensures right-click events are captured by our handler, while left-click events pass through to BasePill's MouseArea to trigger the popout.