Re: applets and focus indication



I just took a minute and played with the Workspace Switcher applet.
It seems to not be broken in regards to drawing focus notification.

A) In multi-workspace mode, if I click on a workspace that is not the
   current workspace, which has no windows open in it, I get switched
   to that workspace, and Nautilus grabs focus, so the applet no longer
   has focus, and thus no rectangle is displayed.

B) In multi-workspace mode, if I click on a workspace that has windows
   open, but is not the current workspace, the window that received the
   last mouse click in that workspace (this is the case for me anyway),
   grabs focus, leaving the applet unfocused, and thus no rectangle.

C) If I click on the current workspace, in a window that is shown in the
   applet, that window grabs focus, and then the applet has no
   rectangle, because it has no focus again.

D) If I click on the current workspace, in the area where there are no
   windows (the desktop area), then the applet retains focus, and the
   rectangle is drawn.

In all cases, the applet draws the focus rectangle when it does have
focus. These times may only be a second or less, but mouse clicks don't
last very long. Also, clicking on the lines separating the workspaces,
results in the same behavior as case D, as no workspace is switched.
So, all in all, not having a focus rectangle around the applet, when
right clicking on an applet, makes sense, as the menu has focus, not
the applet. I'm going to agree with Havoc on this, and say punt, because
it is the applet's problem, if it wants to draw focus rectangles around
the toplevel widget, when it's children have focus.

On Mon, 2002-10-14 at 22:59, 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.
> 
> 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.
> 
> 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?
> 
> So can't we just punt and say this is the applet's problem?
> 
> Havoc

-- 
Rodney Dawes <dobey free fr>



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