After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312855 - GtkTreeView should NOT have header buttons focusable using Tab key
GtkTreeView should NOT have header buttons focusable using Tab key
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.8.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2005-08-08 07:10 UTC by Miroslav Rajcic
Modified: 2005-08-10 14:09 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Miroslav Rajcic 2005-08-08 07:10:04 UTC
Please describe the problem:
In my application I am using GtkTreeView with header visible.

When moving widget focus with tab key, GtkTreeView gets focus two times:
first it receives focus on tree header, then on the list part of the tree
widget. I am not able to prevent this, since there is no public access to the
header control.

This seems wrong since, looking from the outside, it is one widget only
(composite or not) and should receive focus only once in a cycle. 
Also it degrades my application behaviour, requiring too much Tab key presses to
move the focus.

In Windows, tree/list view control header is not focusable, and that seems much
more natural.

My suggestion is:
- please make header part NOT focusable
- if that is NOT acceptable, then please make an API to enable me to make it
optionally NOT focusable

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Matthias Clasen 2005-08-08 16:30:49 UTC
Does gtk_tree_view_set_headers_clickable not do what you want ?
Comment 2 Miroslav Rajcic 2005-08-09 07:09:38 UTC
Nope, what I want is that the header can be clickable but not get focus event.

Even more interesting, it is possible to set gtk_tree_view_set_headers_clickable 
to FALSE, but additionaly set gtk_tree_view_column_set_clickable to TRUE and the
column will be clickable.
What is the point of the gtk_tree_view_set_headers_clickable then ?

What I want to say, it is possible to have button not receiving focus with
keyboard events but still be clickable (in Windows it is easy, just removing
"tab stop" style).
Even more, on Windows, this is default behaviour for List view control with headers.

To conclude, it seems unnatural for a single control to have two focus points.
Comment 3 Matthias Clasen 2005-08-09 15:00:35 UTC
I don't think its unnatural at all. The treeview is a complex widget, why should
it not have multiple focus locations ? If you would turn that off in your
application, it would 
a) be inconsistent with all other GTK+ apps and
b) less usable for people who need to use the keyboard
Comment 4 Miroslav Rajcic 2005-08-10 06:12:37 UTC
Real problem is that the focus does not seem to have any sense there.

Even if the header button gets focus with Tab key, it does not react to Enter
key press or something similar (AFAIK), it reacts only on mouse click.
This way one focus position seems compeltely wasted.
Comment 5 Jonathan Blandford 2005-08-10 14:09:48 UTC
1) Space activates the buttons
2) Alt Left/Right reorders them if they're reorderable
3) They can have child widgets