diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 21:51:55 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-04 12:54:28 +0200 |
| commit | aa86d61c1a716c2e0a2cdc55ae396808eeb494d1 (patch) | |
| tree | 482ce795d4b812f02b5c6abc3215a80944aab7d3 /LICENSE | |
| parent | 53ae709f1aa79d7cc739f7f38b4bcb1c0c578ee3 (diff) | |
| download | qtmaildir-aa86d61c1a716c2e0a2cdc55ae396808eeb494d1.tar.gz qtmaildir-aa86d61c1a716c2e0a2cdc55ae396808eeb494d1.zip | |
fix(completion): filter keys on the application, not the line edit
Showing the popup takes focus away from the query bar and the popup
window grabs the keyboard, so keys pressed while it is up are delivered
to the popup. An event filter installed on the line edit therefore never
ran at the one moment it had to, leaving Tab to move focus to the next
widget and Return to reach the thread list and open a message.
Install the key filter on the application instead, which sees events
before any widget receives them. It returns immediately unless our own
popup is visible, so it cannot affect keyboard handling elsewhere. The
FocusIn filter stays on the line edit, where it is correctly scoped: it
only fires with the popup down.
Accepting a completion now also reopens the popup when the caret lands
somewhere more can be offered, so taking "tag:" goes straight on to the
tag list instead of needing a second complete_query. The chain stops on
a stem that is already a complete candidate, which is what every accept
produces. The mouse path chains identically.
The previous tests passed against the broken code because they posted
events straight to the line edit, bypassing the delivery path a real
keypress takes. The new tests route keys through the active popup and
run against a real X display; offscreen does not grab the keyboard and
cannot reproduce this class of bug.
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions
