RESOLVED FIXED 15466
[gtk] widget does not take focus on mouse click
https://bugs.webkit.org/show_bug.cgi?id=15466
Summary [gtk] widget does not take focus on mouse click
Lars Lindner
Reported 2007-10-11 06:55:34 PDT
The current GTK widget does not set the focus if it receives a mouse button pressed event.
Attachments
Grabbing widget focus in mouse press callback. (1.21 KB, patch)
2007-10-11 07:03 PDT, Lars Lindner
no flags
Grabbing widget focus in mouse press callback. (1.22 KB, patch)
2007-10-11 07:05 PDT, Lars Lindner
no flags
Grabbing widget focus in mouse press callback. (1.21 KB, patch)
2007-10-11 07:07 PDT, Lars Lindner
alp: review+
Lars Lindner
Comment 1 2007-10-11 07:03:14 PDT
Created attachment 16627 [details] Grabbing widget focus in mouse press callback. This patch copies the solution of the QT widget, which sets the widget focus in mouse press and double click callback. I also copied a FIXME comment from the QT code. I'm not sure if it is relevant.
Lars Lindner
Comment 2 2007-10-11 07:05:20 PDT
Created attachment 16628 [details] Grabbing widget focus in mouse press callback. Argh... I missed a tab. Reposting.
Lars Lindner
Comment 3 2007-10-11 07:07:13 PDT
Created attachment 16629 [details] Grabbing widget focus in mouse press callback. Fixing wrong spaced braces.
Maciej Stachowiak
Comment 4 2007-10-13 18:45:08 PDT
Someone who knows Gtk should look at this.
Alp Toker
Comment 5 2007-10-27 22:28:50 PDT
Comment on attachment 16629 [details] Grabbing widget focus in mouse press callback. The focus issues need some real attention, but if this small patch helps your use case then it can go in.
Alp Toker
Comment 6 2007-10-27 22:34:05 PDT
Landed in r27168.
Lars Lindner
Comment 7 2007-10-28 09:44:44 PDT
Alp: thanks for accepting it! Yes, it helps my use case because now the focussing in my multi-paned application works as expected. Before clicking in the WebKit widget had the focus still sitting in some other widget and any following key navigation navigated the wrong widget. So it is an improvement from the embedders viewpoint. With this merged I'll try to understand the code and see why the cursor key navigation when having focus doesn't work for me.
Note You need to log in before you can comment on or make changes to this bug.