| Summary: | MouseListener (with count for e.g. 2) on Linux-Gtk | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Schindl <tom.schindl> | ||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ericwill, ipun, pinnamur, snorthov | ||||||
| Version: | 3.3 | Keywords: | triaged | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=510803 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 184346 | ||||||||
| Attachments: |
|
||||||||
|
Description
Thomas Schindl
Created attachment 66160 [details]
Snippet to try out
Created attachment 135272 [details]
Patch
We used to grab the focus onto Table for every button-press-event. Due to this, though user tries to assign the focus to Text in editor, the focus is being grabbed by Table.
For every double-click, 3 events are generated- 2 button-press-events for single-click and a button-press-event for double-click. As we post the event for 2nd button-press-event (clickCount is 2), editor is created in the eventHandler code. Then, another button-press-event of Double-click is generated, at which we incorrectly grab the focus to table.
The fix is to grab the focus on only button-press-event of single-click. The same rule applies for List and Tree also.
Bogdan, the fix works well for single/double-click events. However, while I was testing, I realize that it does not work for triple-click (the focus is reassigned back to table). After the editor is created, Text loses the focus and assigns it back to Table. I was not able to spot the code that grabs the focus to table. I've seen only focus-out (for Text) event generated after triple-click. I'm not quite sure whether this is native behaviour or not. Can you suggest whether I miss anything here ? Thanks!
This is still reproducible. (In reply to Eric Williams from comment #3) > This is still reproducible. I cannot reproduce this issue any longer using SWT from master, GTK3.24, and Fedora 29. |