Closed Bug 15470 Opened 22 years ago Closed 22 years ago

Linux/Gtk: Clicks shouldn't always grab focus

Categories

(Core :: XUL, defect, P3)

Sun
Solaris
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mcafee, Assigned: pavlov)

Details

[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;
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
checked in fix
Status: RESOLVED → VERIFIED
marking VERIFIED
You need to log in before you can comment on or make changes to this bug.