Re: applets and focus indication

Hey Havoc,

On 14 Oct 2002, Havoc Pennington wrote:

> Mark McLoughlin <mark skynet ie> writes:
> > 	o Is there any other way of indicating focus for these applets
> > 	  other than drawing the usual focus indication around them?
> >
> > 	    --> I don't think so.
> I'm not quite sure about this. For example the workspace switcher
> could highlight in some way when it gets focus.

	Oh sure, of course it could. This whole thing is about what
do we do about applets that don't do this ..

> But, there's another question I have. Don't many applets already draw
> their own focus indication? Is the panel going to draw a second,
> duplicate indication?
> Seems to me that focus can't be drawn by the panel because of applets
> like the window list; it needs to draw focus on the individual
> buttons. Only the applet can know if it has subwidgets or not, and
> whether to allow whole-applet focus or subwidget focus or both, etc.
> Any applet that's a GtkButton will draw its own focus as well, for
> example.

	That's what all the bable about focusable children and
toplevel tooltips was about in the original mail :-)

	The window list has focusable children and draws a focus
indication around one them when it has focus. No problem, that's fine
- PanelApplet won't draw any focus indication around the window list.

	This is done by iterating over the children checking the
CAN_FOCUS flag. If one of the children can take focus, we assume it
will draw a focus indication - if not its a bug in the applet.

	There is one other case where the PanelApplet widget needs to
take focus - and that is where there is a tooltip on PanelApplet
widget itself. So, take the CD player as an example - tab to it and
you'll see the toplevel takes focus, hit Ctrl-F1 and the "CD Player"
tooltip pops up, use the arrow keys and you'll see focus moving
between the children. So, I'd like to see these toplevel tooltips go
away in favour of more descriptive tooltips on the children.

> Note this is orthogonal to whether the focus is drawn as a rectangle
> around the applet. If the best way we can think of to draw workspace
> switcher focus is to draw a big rectangle around it, the switcher can
> do that itself, can't it?

	Well, if that's all its going to do - why make it do it? Why
not make it the common fallback case that libpanel-applet will do it - like
with the clock, battery applet, system monitor etc.

> So can't we just punt and say this is the applet's problem?

	We are doing that - unless its obvious the applet isn't doing
anything about it :-)


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