Change Style while moving windows

Hello,

I am having this code in order to change pager/docker to layer 0 6 while moving the windows, and then to return to bottom layer when I finished moving my windows (release).
Is there any solutions to make it work. ? thanks

[code]AddToFunc changelayer

  • I Style “FvwmDock” StaysOnTop
  • I Style “FvwmPager” StaysOnTop

AddToFunc changelayerback

  • I Style “FvwmDock” StaysOnBottom
  • I Style “FvwmPager” StaysOnBottom

AddToFunc Mymove I Raise

  • M changelayer
  • M Move
  • M changelayerback
    [/code]

I tried this too:

[code]AddToFunc Mymove I Raise

  • M Style FvwmPager StaysOnBottom, NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, NeverFocus, !Iconifiable, NoHandles, BorderWidth 1
  • M Move
  • M Style FvwmPager StaysOnTop, NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, NeverFocus, !Iconifiable, NoHandles, BorderWidth 1 [/code]

You’re suffering from a misunderstanding that functions are executed in order for each entry contained therein. They’re not, and I’ve written about this before:

fvwmwiki.bu-web.de/FunctionSynchronisation
edulinux.homeunix.org/~n6tadam/f … fhobia.txt

What you want to have happen is something which operates during. You can’t. Functions grab the pointer which queues events until its released. What you’re wanting to do (and what those two URLs I have given you hint at doing) is to use PipeRead for some of your operations. You’d hence get a pre/post matching condition which is the best you could expect.

Because Styles tend to apply immediately now, this rather invalidates the use of UpdateStyles although I strongly suggest you use it here anyway. (Using WindowStyle here would have been even better still)). I also note you don’t have a DestroyFunc command either.

So you want something like this:

[code]
DestroyFunc Mymove

  • I Raise
  • M PipeRead “Style FvwmPager StaysOnBottom, NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, NeverFocus, !Iconifiable, NoHandles, BorderWidth 1”
  • M Move
  • M PipeRead “Style FvwmPager StaysOnTop, NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, NeverFocus, !Iconifiable, NoHandles, BorderWidth 1”
  • M UpdateStyles[/code]

Although given there’s no difference between the two styles above, I don’t know what it is you’re trying to achieve. There’s also something to be said for using WindowStyle here, as in:

Next (FvwmPager) WindowStyle !Handles, !Title...
....
Next (FvwmPager) DestroyWindowStyle

– Thomas Adam

It works ! Thanks a lot Thomas !

The code for having on top fvwmpager & fvwmdock while moving windows:

Style FvwmDock    NoTitle,  Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip, NeverFocus, !Iconifiable, StaysOnBottom, NoHandles, BorderWidth 1 

DestroyFunc Mymove I Raise
AddToFunc Mymove I Raise
+ I Raise
+ M PagerOnTop
+ M Move
+ M Schedule 100 PagerCanBeHidden

DestroyFunc PagerOnTop
AddToFunc PagerOnTop
+ I All ("FvwmPager") Layer 0 6
+ I All ("FvwmDock") Layer 0 6
+ I UpdateStyles

DestroyFunc PagerCanBeHidden
AddToFunc PagerCanBeHidden
+ I All ("FvwmPager") Layer 0 4
+ I All ("FvwmDock") Layer 0 4
+ I UpdateStyles

Mouse 1 W       4       Mymove

This won’t necessarily enforce the ordering – it’s PipeRead which blocks so you’re always guaranteed to have to wait for it before the next step can happen.

Because you’re no longer using the Style command in this function, the use of UpdateStyles is silly.

The same for this function.

– Thomas Adam