Re: Refining the concept of focus
- From: Owen Taylor <otaylor redhat com>
- To: "Padraig O'Briain" <Padraig Obriain Sun COM>
- Cc: gtk-devel-list gnome org
- Subject: Re: Refining the concept of focus
- Date: Wed, 22 May 2002 12:59:19 -0400 (EDT)
"Padraig O'Briain" <Padraig Obriain Sun COM> writes:
> Owen,
>
> Some requests for clarification below.
>
> >
> > To fully implement the XEMBED spec, some refinement of how GTK+ deals with
> focus
> > was necessary.
> >
> > The following patch adds three properties:
> >
> > GtkWidget::is_focus - is this focus the focus widget within it's (in-process)
> GtkWindow
> > GtkWindow::is_active - is the (possibly out-of-process) toplevel of the
> window the X focus
> > GtkWIndow::has_toplevel_focus - does this toplevel window contain the focus
> widget
> >
> >
> > +----------- GtkWindow (A)--------------+
> > | |
> > | GtkPlug (B)------+ GtkPlug-(D)------+ |
> > | | GtkEntry (C)-+ | | GtkEntry (E)-+ | |
> > | | | | | | |[focus here] | | |
> > | | +------------+ | | +------------+ | |
> > | +----------------+ +----------------+ |
> > +---------------------------------------+
> >
> > So, in a situation like the above, we might have
> >
> > is_focus set on C and E
>
> Is is_focus set on the GtkSockets which connect to B and D?
Yes, it is set on those widgets as well. I thought about adding them
to the diagram, but figured it would make the ascii art too complex.
> > is_active set on A, B, and D
>
> I expected that only D would have is_active set. It seems I do not understand
> what is_active means.
Some toolkits (such as Qt, in some themes, or MacOS) draw widgets
differently when the toplevel window has the global keyboard focus.
(Typically, they might draw all widgets in an inactive window
with less contrast.)
GTK+ doesn't do this, but needs to support the concept when embedding
such toolkits.
The is_active flag means that the GtkWindow is part of a real
toplevel that has the global keyboard focus.
> > has_toplevel_focus set on A and E
>
> I assume you mean A and D here.
Yep.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]