Re: Hiding the widget with the focus/default



Owen Taylor <otaylor redhat com> writes:

> But it strikes me as wrong to have the focus on a hidden window,
> so I came up with the following patch which unsets the focus
> from within widgets when they are hidden.

Would it be possible to automatically focus some other widget when the
focus widget is hidden, perhaps by programmatically tabbing into the
parent container?

> So, it's just a special-case hack. But it's probably a useful hack?
> 
> I'd appreciate it if anyone wanted to review this patch ... it's
> actually smaller than it looks since most of it is just code
> movement.

The patch looks fine to me, except that I would call the new
unset_focus_and_default(), not just unset_focus_default(). "Unsetting
default focus" confused me a bit. Maybe I would also add an assertion
that gtk_widget_get_toplevel (widget) == window.


Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]