Panel Autohide?

Jasper Huijsmans jasper at moongroup.com
Wed Mar 19 15:47:36 CET 2003


On 19 Mar 2003 08:01:55 +0000
Erik Touve <etouve at earthlink.net> wrote:

> From: Jasper Huijsmans <jasper at moongroup.com>
> To: xfce4-dev at xfce.org
> Subject: Re: Panel Autohide
> Reply-To: xfce4-dev at xfce.org
> 
> On 18 Mar 2003 21:38:16 +0100
> Olivier Fourdan <fourdan at xfce.org> wrote:
> 
> > > Hi all,
> > > 
> > > I agree on the panel autohide feature. It should hide to the top,
> > > left, right or bottom depending on screen location and panel.
> > > 
> 
> > hmm, you mean simply hiding to the nearest edge? left/right for
> > vertical mode and top/bottom for horizontal I presume. Interesting.
> 
> > 
> > Erik are you still interested in trying to implement this? I would >
> like
> > to see if this works. The way I think this could work:
> > 
> > 1 - panel loses focus (no part of the panel has focus)
> > 2 - start timeout (say 0.5 sec)
> > 3 - if still unfocussed -> hide panel. 
> > 
> > The way to do the hiding I think is to use a separate window of 1 >
> > pixel
> > wide on the nearest edge and catch mouse entry events to trigger the
> > unhide. It can either be a visible window with equal height or width
> > as
> > the panel or an invisible input-only window (is this GtkInvisible?).
> >
> >        Jasper
> 
> Yes, I'm still very interested in doing this.  Sounds pretty
> straightforward.  Hopefull I can start looking at some code tonight.
> 

Great! If I can help/test let me know. A few more thoughts:

* don't hide when a subpanel is opened, even if it loses focus. This
  may make it easier to implement. pseudo code:

gboolean hide_timeout(void)
{
  if (!panel_has_focus && !open_popup)
    autohide_panel();

  return FALSE;
}

  You may have to take some special action when closing the sub panel,
  like grabbing focus on the panel.

* no need to test if the panel is on the edge. Usually is will be near
  enough and if it's not the user should simply not use autohide, which
  in fact doesn't make much sense in that situation anyway, IMO.

	Jasper



More information about the Xfce4-dev mailing list