FVWM: AutoHide (#466) [was - Re: Re: MouseOver/Focus event handler?]

From: Nadim Saeed <nadim.saeed_at_intel.com>
Date: Thu, 16 Dec 1999 12:49:33 -0800 (PST)

On Wednesday - December.15.1999 [14:25:39 -0500],
 Brad Giaccio (bgiaccio_at_psrw.com) wrote:
> On Wed, Dec 15, 1999 at 10:55:53AM -0800, Nadim Saeed wrote:
> > > *FvwmEventPassId
> > > *FvwmEvent focus_change my_focusevent
> > >
> > > DestroyFunc my_focusevent
> > > AddToFunc my_focusevent I WindowId $0 (!FvwmIconMan) AnimatedMove -1150p 0p
> > > + I WindowId $0 (FvwmIconMan) AnimatedMove 0 0
> > >
> > > AddToFunc StartFunction I FvwmEvent
> > >
> >
> > This is beginning to sound very much like an AutoHide command. Could someone
> > familiar enough with the code use the underlying ability noted above and
> > simply its specification and possibly create a true "autohide" command/style ?
> >
> > It was be ideal to see something along the lines of,
> >
> > Style "Fvwm*" AutoHide
> >
> > BTW: this very much relates to PR#466 in the enhancements branch of FVWM's bug
> > tracker.
> >
>
> This is untested but if we the function was changed to
> AddToFunc my_focusevent I WindowId $0 (!$1) AnimatedMove -1150p 0p
> + I WindowId $0 ($1) AnimatedMove 0 0
>
> and
> *FvwmEvent focus_change my_focusevent FvwmIconMan
>
> You would have a generic function that could autohide any whindow.
>
> Brad

That would be a generic enough solution for FvwmIconMan only that is abutted
to the left-edge of the screen (I think). What I was getting at is to use
the abilities demonstrated above to simplify the creation of a true generic
AutoHide solution with no regard to a window's location (it would certainly
make more sense if it were implemented within fvwm itself instead of as user
commands). What I was getting at is a solution that would encompass _any_
window say an xterm for example that is abutted to the top of the screen,
right-side or bottom -- all AutoHiden via the same generic command (no
user-specified pixel size moves -- ie. NO '1150p' or alike).

For example,

   Style "xterm*" AutoHide

fvwm certainly knows the dimensions of the window in question and knows which
edge is abutted to the edge and so it would do the math as such

if ( window is abutted to edge of screen )
{
   if ( more than one edge is abutted )
   {
      find the longest edge and set it as the edge in question
   }
   find abutment direction /* abutted on x-axis or y-axis */
   find the opposite-direction size /* if abutted on x-axis - find height
                                        if abutted on y-axis - find width */

   calculate hide_size ( opposite-direction-size - 2pixels )
   move/shade window in opposite-direction by hide_size pixels
}

The reason I say "shade" instead of move is due to the fact that moving a
window beyond the current visible screen would still show the window in the
pager (ie. it would be kinda confusing to look). Ideally you'd only see a
2-pixel worth of the window (a slither if you will) on both the screen and
the pager.

Alas, as noted a _very_ generic solution is what I was after. Ideally it
would work in the same fashion that FvwmTaskBar's AutoHide would (Olivier ?)
but be flexible enough to be invoked as a style. Then, one would be able to
either AutoHide groups of windows "Xterm*" or just do it on a select few by
clicking on xterms and modifying their property (similar to maximize or
sticky for example)

So one could be able to,

  AddToMenu WindowOps-Popup
  + "WindowOps" Title
  + "&Move" Move
  + "&Resize" Resize
  + "(Un)Stick" Stick
  + "(Un)Vertical" Maximize 0 100
  + "(Un)AutoHide AutoHide <--------------


Thanks

 - Nadim


--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Dec 16 1999 - 14:50:57 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST