Skip to content

fix(taskbar): support accessible primary activation - #5335

Open
sanyarnd wants to merge 1 commit into
Alexays:masterfrom
sanyarnd:fix/taskbar-accessible-activation
Open

sanyarnd wants to merge 1 commit into
Alexays:masterfrom
sanyarnd:fix/taskbar-accessible-activation

Conversation

@sanyarnd

Copy link
Copy Markdown

What does this PR do?

The wlr taskbar currently runs its primary action from a raw button-release event. GTK accessibility clients activate a button through its clicked signal instead, so an AT-SPI DoAction does not trigger the configured taskbar action.

This moves the primary action to Gtk::Button::signal_clicked(), which is shared by pointer and accessibility activation. Middle- and right-click actions remain on the button-release path. Dragging continues to use GTK's configured drag source, which suppresses a normal click once a drag starts.

Related issues

None.

Checklist

  • Code is formatted with clang-format
  • Builds locally (ninja -C build)
  • Man page updated for any new/changed user-facing option (man/) — no user-facing options changed
  • Tested against the affected module(s)

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR appears safe to merge after a non-blocking stale callback reference in the action-dispatch documentation is corrected.

Findings

  1. P2 Stale Callback Reference

Summary

This PR routes primary taskbar activation through GTK's clicked signal so pointer, keyboard, and accessibility activation share the same action path. It retains raw button-release handling for middle and right clicks and delegates drag initiation to GTK's configured drag source.

  • Adds a shared helper for dispatching configured task actions.
  • Moves primary activation to signal_clicked().
  • Keeps middle- and right-click actions on the release-event path.
  • Removes the custom drag-threshold state and motion callback.
  • Leaves one obsolete callback reference in nearby action-dispatch documentation.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Task button input] --> B{Activation type}
  B -->|Primary pointer, keyboard, or accessibility| C[Gtk::Button clicked signal]
  C --> D[handle_primary_clicked]
  B -->|Middle or right release| E[handle_button_release]
  D --> F[handle_action]
  E --> F
  B -->|Primary drag| G[GTK drag source]
  G --> H[Task reordering callbacks]
Loading

Reviews (1) · Last reviewed commit: "fix(taskbar): support accessible primary..."

button.add_events(Gdk::BUTTON_RELEASE_MASK);
button.signal_button_release_event().connect(
sigc::mem_fun(*this, &Task::handle_button_release), false);
button.signal_clicked().connect(sigc::mem_fun(*this, &Task::handle_primary_clicked));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stale callback reference

The nearby action-dispatch comment still says per-task actions are handled by Task::handle_clicked, but this change replaces that callback with Task::handle_primary_clicked. This stale reference could mislead future maintenance, so it should name the actual handler.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

1 participant