Skip to content

GTK palette: mouse click/drag leaks to editor underneath #192

Description

@JDonaghy

Problem

When the command palette / file picker is open in the GTK backend, click-and-drag inside the palette popup selects text in the editor behind it instead of being consumed by the palette.

Pre-existing; noticed during Session 329 smoke test of the palette D6 render migration. The migration only touched painting, not event routing.

Expected

While the palette modal is visible, mouse events over the palette bounds should be captured by the palette's DrawingArea (or routed to palette handling by the event dispatch) and never reach the underlying editor's drag-selection path.

Suspected Cause

The palette's DrawingArea doesn't have a GestureDrag / GestureClick controller that returns "handled" before the event bubbles to the editor, OR the editor's drag controller isn't guarded by "palette visible" state.

TUI parity reference: `src/tui_main/mouse.rs` routes mouse events in priority order and consumes them at the palette branch before the editor branch gets a chance.

Files

  • `src/gtk/mod.rs` — search for palette DrawingArea setup + any attached `GestureDrag` / `GestureClick` controllers
  • `src/gtk/click.rs` — editor drag-selection handler; needs to guard on `engine.picker.is_some()` or equivalent

Priority

Moderate — annoying but workaround exists (don't drag in the palette). Related issues: #190 (scrollbar not draggable), #191 (scrollwheel delta too small).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions