Re: FVWM: Turn on title on WindowShade

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 5 Nov 2004 11:32:29 +0000

On 05 Nov 2004 11:58:04 +0100, Frank Gruellich wrote:
>
> * Scott Smedley <ss_at_aaoepp.aao.gov.au> 5. Nov 04:
>
> > > Or can I set 'Title' for shade windows only?
> > AddToFunc MyWinShade
> > + I ThisWindow WindowStyle Title
> > + I ThisWindow WindowShade True
> > AddToFunc MyWinShadeOff
> > + I ThisWindow WindowStyle NoTitle
> > + I ThisWindow WindowShade False
>
> Thank you very much, I missed the WindowStyle. With this and the stuff
> from the last night I have this:
> ,-----
> |DestroyFunc ToggleShade
> |AddToFunc ToggleShade
> |+ I ThisWindow (Shaded) WindowStyle NoTitle
> |+ I ThisWindow (Shaded) WindowShade false
> |+ I TestRc (1) Break
> |+ I ThisWindow (!Shaded) WindowStyle Title
> |+ I ThisWindow (!Shaded) WindowShade $0
> '-----
> and bind it to
> ,-----
> |Key h TFISW CS Current ToggleShade West
> |Key j TFISW CS Current ToggleShade South
> |Key k TFISW CS Current ToggleShade North
> |Key l TFISW CS Current ToggleShade East
> '-----
>
> This works (BTW: I could use something like 'TitleSide North'), but
> looks kinda strange: when shading, first the window is shaded and then
> the title is added (fine); when unshading, first the window is unshaded
> and then the title is removed. Both seem to happen in the wrong order,
> don't they? (It doesn't matter much, but some as it resizes the windows
> content a bit this messes up some applications, that doesn't like this,
> eg. my vim in GNU screen in xterm.)

Please indent the commands with 2 spaces, to simplify copy-paste.

Try this function definition instead:

  DestroyFunc ToggleShade
  AddToFunc ToggleShade
  + I ThisWindow (Shaded) WindowStyle NoTitle
  + I ThisWindow (Shaded) UpdateStyles
  + I ThisWindow (Shaded) WindowShade false
  + I TestRc (1) Break
  + I WindowShade $0
  + I WindowStyle Title

> Anyway, because this doesn't help very much for 'ToggleShade West' I
> replaced 'NoTitle' with 'BorderWidth 1' and 'Title' with 'BorderWidth
> 8'. This way another strange effect occurs (beside the wrong order):
> then shading to North or East the top right corner (the border, not the
> window content) of shaded and unshaded window stay the same place at
> screen, which make the lower or left border, respectively, jump around
> in a strange way; then shading West/South the right/top border of the
> shaded window jump to the position of the left/bottom border of the
> unshaded window. Both goes for unshading, too. Look at it then
> unshading with WindowShadeSteps 25, the window content will jump around.
>
> (Now I do a very bold assumption: this behavior is not configurable.)
>
> I would appreciate something like this: preserve the position of window
> content in all circumstances (Of course not in the direction of shade:
> left/right for North/South and top/bottom for West/East.) and add the
> window borders to the exterior.

I am not sure I understand all you mean, but in order to get titles at
the left/right too, try this config:

  Key h TFISW CS Current ToggleShade Left
  Key j TFISW CS Current ToggleShade Bottom
  Key k TFISW CS Current ToggleShade Top
  Key l TFISW CS Current ToggleShade Right

  DestroyFunc ToggleShade
  AddToFunc ToggleShade
  + I ThisWindow (Shaded) WindowStyle !Title
  + I ThisWindow (Shaded) UpdateStyles
  + I ThisWindow (Shaded) WindowShade false
  + I TestRc (1) Break
  + I WindowStyle TitleAt$0
  + I UpdateStyles
  + I WindowShade
  + I WindowStyle Title

Regards,
Mikhael.
--
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 Fri Nov 05 2004 - 05:33:04 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:57 BST