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 308632 - Last launcher/applets get highlighted/focused when opening the menu
Last launcher/applets get highlighted/focused when opening the menu
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.22.x
Other All
: Normal minor
: ---
Assigned To: Christian Neumair
Panel Maintainers
: 338350 345136 378887 383146 441266 543473 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-06-22 10:26 UTC by Sebastien Bacher
Modified: 2008-08-04 02:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Proposed (workaround) patch (409 bytes, patch)
2008-03-13 16:13 UTC, Christian Neumair
rejected Details | Review

Description Sebastien Bacher 2005-06-22 10:26:50 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/12084

"I really don't know how to describe this bug, so I simply describe what happens:

1. Click on any launcher on the top panel
2. Click on any menu on the top panel
3. Observe that the launcher icon was also "selected" by being highlighted and
having a dotted box drawn around it"
Comment 1 Brent Smith (smitten) 2005-10-23 00:59:30 UTC
I can confirm this, but I'm not sure it's even a bug... Can anyone comment? Vincent?
Comment 2 Vincent Untz 2005-12-31 11:09:52 UTC
Yup, it's a bug.
Comment 3 Vincent Untz 2006-08-09 10:07:49 UTC
*** Bug 345136 has been marked as a duplicate of this bug. ***
Comment 4 Vincent Untz 2006-08-09 10:08:15 UTC
*** Bug 338350 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Holbach 2006-12-22 15:32:15 UTC
URL is now: https://launchpad.net/distros/ubuntu/+source/gnome-panel/+bug/18361
Comment 6 Vincent Untz 2007-01-15 10:51:59 UTC
*** Bug 383146 has been marked as a duplicate of this bug. ***
Comment 7 Vincent Untz 2007-01-15 10:55:39 UTC
*** Bug 378887 has been marked as a duplicate of this bug. ***
Comment 8 Tarik Jabri 2007-08-14 12:33:10 UTC
I had never seen this bug before until I installed Ubuntu Gutsy Alpha 4. This bug suddenly appeared. Please see https://launchpad.net/distros/ubuntu/+source/gnome-panel/+bug/18361
 for screenshots of the problem under two different circumstances (it either draws a dotted selection box around the menu panel or draws one around the last menu panel item clicked on and highlights it).
Comment 9 Vincent Untz 2007-09-02 14:45:47 UTC
*** Bug 441266 has been marked as a duplicate of this bug. ***
Comment 10 Christian Neumair 2008-03-13 15:47:35 UTC
1. The entire issue seems to be a bit more complex:

We don't have a policy for the interaction between mouse clicks and a keyboard focus. At the moment, the applets can be divided into a few groups:

(A) Cannot receive any keyboard focus (I haven't seen any, though)
(B) Can receive keyboard focus, keyboard focus will be grabbed on mouse click (launchers)
(C) Can receive keyboard focus, keyboard focus will not be grabbed on mouse click (menu and many others)

Those that can receive a keyboard focus can also be divided into drawing the focus indicator, and those not drawing it.

2. Unified keyboard focus policy / GTK+ problems

Regarding a unified policy, I'd propose to adopt the policy that GtkTreeView seems to use for its cells:

* Mouse-clicks: Keyboard focus is taken but the focus indicator is not drawn
* Keyboard presses: Keyboard focus is taken/moved and the focus indicator is drawn

However, implementing this for GTK+-derived widgets ourselves for all applets  is totally tedious and will just cause lots of sick and buggy code.

The problem is that GTK+ assumes that all widgets having the keyboard focus want a focus indicator to be drawn. This is wrong. Thus, we should have a GTK+ widget property that allows us to disable focus drawing even for focused widgets. We can also implement it as a widget flag (cf. GTK_TREE_VIEW_DRAW_KEYFOCUS).

3. Long short story

A satisfying solution with a decent focus policy without any GTK+ changes is just to complex and tedious. 

For the moment, a workaround would be to not grab the keyboard focus when clicking a launcher. Dual keyboard/mouse users might not be happy, but there is no keyboard focus policy, and some applets are broken anyway.

best regards,
 Christian Neumair 
Comment 11 Christian Neumair 2008-03-13 16:13:08 UTC
Created attachment 107229 [details] [review]
Proposed (workaround) patch

This patch is a workaround. It will prevent the panel from giving the keyboard focus to launchers on click, and so no frame will be drawn.
Comment 12 Vincent Untz 2008-07-28 00:06:08 UTC
*** Bug 543473 has been marked as a duplicate of this bug. ***
Comment 13 Vincent Untz 2008-08-04 02:34:13 UTC
This patch only worked for launchers, but wasn't working for applets. I fixed it by giving focus to no child of the panel when the menu is opened.