Bug 15466 - [gtk] widget does not take focus on mouse click
Summary: [gtk] widget does not take focus on mouse click
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-11 06:55 PDT by Lars Lindner
Modified: 2007-10-28 09:44 PDT (History)
0 users

See Also:


Attachments
Grabbing widget focus in mouse press callback. (1.21 KB, patch)
2007-10-11 07:03 PDT, Lars Lindner
no flags Details | Formatted Diff | Diff
Grabbing widget focus in mouse press callback. (1.22 KB, patch)
2007-10-11 07:05 PDT, Lars Lindner
no flags Details | Formatted Diff | Diff
Grabbing widget focus in mouse press callback. (1.21 KB, patch)
2007-10-11 07:07 PDT, Lars Lindner
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Lindner 2007-10-11 06:55:34 PDT
The current GTK widget does not set the focus if it receives a mouse button pressed event.
Comment 1 Lars Lindner 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.
Comment 2 Lars Lindner 2007-10-11 07:05:20 PDT
Created attachment 16628 [details]
Grabbing widget focus in mouse press callback.

Argh... I missed a tab. Reposting.
Comment 3 Lars Lindner 2007-10-11 07:07:13 PDT
Created attachment 16629 [details]
Grabbing widget focus in mouse press callback.

Fixing wrong spaced braces.
Comment 4 Maciej Stachowiak 2007-10-13 18:45:08 PDT
Someone who knows Gtk should look at this.
Comment 5 Alp Toker 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.
Comment 6 Alp Toker 2007-10-27 22:34:05 PDT
Landed in r27168.
Comment 7 Lars Lindner 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.