Linux/Gtk: Clicks shouldn't always grab focus

VERIFIED FIXED

Status

()

defect
P3
normal
VERIFIED FIXED
20 years ago
20 years ago

People

(Reporter: mcafee, Assigned: pavlov)

Tracking

Trunk
Sun
Solaris
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

20 years ago
[rods reports:]
Everytime a widget in gtk grabs focus it sends a focus event. This is
wrong, because everytime you click on a gtk widget it shouldn't reset
the focus to the same window causing a focus event to be dispatched.
There is no bug filed on this, and I can file one, but the change
outlined below is one approach to fixing this.

The only problem is the GTK_WIDGET_HAS_FOCUS doesn't appear to work.

In nsWidget (on GTK) the SetFocus method:

  if (mWidget)
    gtk_widget_grab_focus(mWidget);

  return NS_OK;

------------
I think should be changed to:

  if (mWidget) {
    if (!GTK_WIDGET_HAS_FOCUS(mWidget)) {
      gtk_widget_grab_focus(mWidget);
    }
  }
  return NS_OK;
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 1

20 years ago
checked in fix

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 2

20 years ago
marking VERIFIED
You need to log in before you can comment on or make changes to this bug.