some issues

All,
I tried implementing some features with some Thumbnailing (who hasn’t) but i ran into the following issue.
My setup looks like this

DestroyModuleConfig FvwmEvent: *
*FvwmEvent: add_window Thumbnail

DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I   ThisWindow (!Iconifiable) Break
+ I   Raise
+ I   SetEnv iconloc $[FVWM_USERDIR]/tmp/icon.$[w.id].png
+ I   Piperead "xwd -silent -id $[w.id] | convert -resize 110x110 xwd:- png:$[iconloc]"
+ I   Piperead "echo WindowStyle IconOverride, NoIconTitle, Icon $[iconloc], MiniIcon $[iconloc]"
+ I   UnsetEnv iconloc

DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I   Iconify off
+ I   All (CurrentPage, Iconic) Break

DestroyModuleConfig FvwmIconMan: *
...
*FvwmIconMan:  UseWinList           true
*FvwmIconMan:  DrawIcons            always
...
*FvwmIconMan:  1  Title             ""
*FvwmIconMan:  1  IconName          "FvwmIconMan: all"
*FvwmIconMan:  1  Format            ""
*FvwmIconMan: 1  ShowOnlyIcons     false

*FvwmIconMan:  Action   Mouse 1  A  sendcommand FlipFocus, sendcommand Raise, sendcommand DeThumbnail

Mouse 0  8  A  Function ThumbIcon

DestroyFunc ThumbIcon
AddToFunc   ThumbIcon
+ I Function Thumbnail
+ I Iconify

AddToFunc ExitFunction
+ I Test (!ToRestart) Exec rm -f $[FVWM_USERDIR]/tmp/icon.*
+ I Exec killall trayer
+ I Exec sync

Now this creates an FvwmIconMan instance that show a thumbnails of all open windows, which are updated every time that window is minimized.
These icons are deleted every time i quit FVWM. The following two problems occur.
1: when i restart FVWM i am prompted with the ‘+’ cursor to select windows to Thumbnail, i am not sure why this is happening, because I don’t see any places the Thumbnail function is called without a window to Thumbnail. This continues until i click on the root window and the cursor returns to normal. Also, the WindowStyles seem to have been Destroyed.
2: when i Minimize a window the window gets Thumbnailed and shown in the FvwmIconMan, but also appears as a Thumbnail in the IconBox location, although I have no IconBox Style defined.
Any pointers would be appreciated.

regards,

-Dizz

[color=red]Edited by theBlackDragon:
–> moved from Basic questions[/color]

Why do you have the following in a PipeRead statement?

Piperead "echo WindowStyle IconOverride, NoIconTitle, Icon $[iconloc], MiniIcon $[iconloc]"

You’ll have to upload your entire config for me to see why you get the cross-hair, but, yes, your windowstyles will get destroyed across restarts because the windows lose their decorations. (I’ll skip you the internal details as to why).

Actually, you do have an IconBox style defined – by default, it takes up the whole area of the root window. What you want is:

Style * Noicon

– Thomas Adam

I think because initially i had more variables and some $$(($… stuff. I never rewrote it.

I figured out why the cursor show up during the restart.
I load the FvwmEvent Module during the StartFunction

[code]AddToFunc StartFunction

  • I Module FvwmBacker
  • I Test (Init) Exec exec xscreensaver
  • I Module FvwmButtons -g 120x$[vp.height]-0-0 FvwmSideButtons
  • I Module FvwmIconMan
  • I Module FvwmEvent[/code]
    and then run the following event

DestroyModuleConfig FvwmEvent: * *FvwmEvent: add_window Thumbnail
which tries to create thumbnails of all open windows, but does not know which one to start with. Is this a bug in the add_window event? When I comment it out the cursor doesn’t appear, but Thumbails aren’t created of new windows.
I assume I would have to write a function to go through and reset the MiniIcon and Icon WindowStyle parameters to the correct location, instead of recreating the Thumbnails.
I’ll give the

a try. Thanks!

-Dizz
[/quote]

I think because initially i had more variables and some $$(($… stuff. I never rewrote it.

I figured out why the cursor show up during the restart.
I load the FvwmEvent Module during the StartFunction

[code]AddToFunc StartFunction

  • I Module FvwmBacker
  • I Test (Init) Exec exec xscreensaver
  • I Module FvwmButtons -g 120x$[vp.height]-0-0 FvwmSideButtons
  • I Module FvwmIconMan
  • I Module FvwmEvent[/code]
    and then run the following event

DestroyModuleConfig FvwmEvent: * *FvwmEvent: add_window Thumbnail
which tries to create thumbnails of all open windows, but does not know which one to start with. Is this a bug in the add_window event? When I comment it out the cursor doesn’t appear, but Thumbails aren’t created of new windows.
I assume I would have to write a function to go through and reset the MiniIcon and Icon WindowStyle parameters to the correct location, instead of recreating the Thumbnails.
I’ll give the

a try. Thanks!

-Dizz

Search these forums for the ‘FVWM Tips’ thread.

Since you’ve ignored my request to upload your config verbatim rather than isolating the specific parts (irrespective of whether you think they’re pertinent or not), I can only guess at what’s happening. I can’t reproduce the problem you’re having on restart.

And no, it’s not a bug in the add_window event. I’ll give you an explanation as to why, too. When a window is mapped, the application is requesting to be drawn (displayed) on the screen. FVWM itself intercepts this and maps it itself - as it does so, it gets reparented within its own window (which people typically refer to as the application’s border and title – in effect though it’s another window – with the client inside it). If FVWM didn’t reparent the window, then it would simply embed itself as a child of the root window.

When FVWM restarts, what happens is that FVWM goes back through the window stack in reverse order and reparents the windows. No MapNotify event occurs (what you’d think of as ‘add_window’) for the existing windows. Hence the reason why I want to see your config file as it stands in one piece.

Hmm? What you can do instead is set the icon’s filename as the $[w.id] of the window it is being assigned, and then just apply each file name to the window whose ID it matches.

– Thomas Adam

THank you for the explaination, I will post the configuration and apologize for not posting it in the previous post.

[code]IgnoreModifiers L25
ImagePath /usr/share/pixmaps:/usr/local/share/pixmaps:${HOME}/.fvwm/icons:+

DeskTopSize 1x4
EdgeResistance 200 10000
EwmhBaseStruts 0 120 0 0

Style * Noicon
Style * UseDecor Default
Style * Font “xft:Bitstream Vera Sans:regular:size=9”
Style * BorderWidth 2, HandleWidth 4, MwmButtons, ResizeOpaque
Style * HintOverride, NakedTransient, NoPPosition, WindowShadeSteps 50
Style * ClickToFocus

Style XTerm MiniIcon 16x16-xterm.png
Style Firefox-bin EWMHMiniIconOverride, MiniIcon 16x16-firefox.png
Style gaim EWMHMiniIconOverride, MiniIcon 16x16-gaim.png
Style “GIMP Startup” CenterPlacement, NoTitle, StaysOnTop, NeverFocus
Style gmrun GrabFocus, StaysOnTop, CenterPlacement, NoTitle, WindowListSkip, CirculateSkip, BorderWidth 3
Style “OpenOffice.org 2.0” EWMHMiniIconOverride, MiniIcon 16x16-ooo-writer2.png
Style “Aterm” BorderWidth 0, NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom, NeverFocus
Style kregexpeditor DecorateTransient
Style FvwmIdent NoHandles, WindowListSkip, CirculateSkip, BorderWidth 0, NoTitle, NeverFocus
Style XConsole Sticky, StaysOnBottom, WindowListSkip, CirculateSkip, NeverFocus
Style conky NoHandles, WindowListSkip, CirculateSkip, NoTitle, Sticky, StaysOnBottom, NeverFocus, BorderWidth 0

AddToFunc StartFunction

  • I Module FvwmBacker
  • I Test (Init) Exec exec xscreensaver
  • I Module FvwmButtons -g 120x$[vp.height]-0-0 FvwmSideButtons
  • I Module FvwmIconMan
  • I Module FvwmEvent

AddToFunc ExitFunction

  • I Test (!ToRestart) Exec rm -f $[FVWM_USERDIR]/tmp/icon.*
  • I Exec killall trayer
  • I Exec sync

DestroyModuleConfig FvwmBacker*
*FvwmBacker: Command (Page * *) Exec fvwm-root $[FVWM_USERDIR]/flame.png

DestroyModuleConfig FvwmLowerButtons: *
*FvwmLowerButtons: Columns 20
*FvwmLowerButtons: Font “xft:Bitstream Vera Sans:regular:size=8”
*FvwmLowerButtons: Rows 1
*FvwmLowerButtons: (20x1, Right, Title(Side) " ", Swallow (NoHints) “FvwmIconMan” Module FvwmIconMan)

Style FvwmLowerButtons NoTitle, !State 1, StaysOnBottom, Sticky, WindowListSkip, CirculateSkip, CirculateSkipIcon, HandleWidth 0, BorderWidth 0

DestroyModuleConfig FvwmSideButtons: *
*FvwmSideButtons: Columns 20
*FvwmSideButtons: Rows 100
*FvwmSideButtons: Font “xft:Bitstream Vera Sans:bold:size=8”
*FvwmSideButtons: (1x100)
*FvwmSideButtons: (3x20)
*FvwmSideButtons: (12x20, Swallow “FvwmPager” Module FvwmPager)
*FvwmSideButtons: (3x20)
*FvwmSideButtons: (1x100)
*FvwmSideButtons: (18x3, Title(Side) “Terminal”, Left, Icon 16x16-xterm.png, Action (Mouse 1) Exec "XTerm" exec xterm -fg white -bg black)
*FvwmSideButtons: (18x3, Title(Side) “Mozilla Firefox”, Left, Icon 16x16-firefox.png, Action (Mouse 1) Exec "XTerm" exec firefox)
*FvwmSideButtons: (18x3, Title(Side) “Gaim”, Left, Icon 16x16-gaim.png, Action (Mouse 1) Exec "XTerm" exec gaim)
*FvwmSideButtons: (18x58)
*FvwmSideButtons: (18x4, Swallow (Kill) “trayer” Test (!ToRestart) Exec exec trayer --align left --width 6 --SetDockType false)
*FvwmSideButtons: (18x9, Swallow “xclock” Exec exec xclock -update 1)

Style FvwmSideButtons NoTitle, StaysOnBottom, Sticky, WindowListSkip, CirculateSkip, CirculateSkipIcon, HandleWidth 0, BorderWidth 0

DestroyDecor Default
AddToDecor Default

  • TitleStyle RightJustified Height 17
  • TitleStyle – Flat
  • ButtonStyle All AllActive ( – Flat UseTitleStyle ) AllInactive ( – Flat UseTitleStyle )
  • AddButtonStyle All AllToggled Vector 26 20x20@4 20x80@1 25x80@1 25x20@1 30x20@1 30x80@1 35x80@1
    35x20@1 40x20@1 40x80@1 45x80@1 45x20@1 50x20@1 50x80@1 55x80@1 55x20@1 60x20@1 60x80@1 65x80@1
    65x20@1 70x20@1 70x80@1 75x80@1 75x20@1 80x20@1 80x80@1 – Flat
  • AddButtonStyle All AllUp Vector 26 20x20@4 20x80@0 25x80@0 25x20@0 30x20@0 30x80@0 35x80@0 35x20@0
    40x20@0 40x80@0 45x80@0 45x20@0 50x20@0 50x80@0 55x80@0 55x20@0 60x20@0 60x80@0 65x80@0 65x20@0
    70x20@0 70x80@0 75x80@0 75x20@0 80x20@0 80x80@0 – Flat
  • AddButtonStyle All AllDown Vector 26 20x20@4 20x80@1 25x80@1 25x20@1 30x20@1 30x80@1 35x80@1 35x20@1
    40x20@1 40x80@1 45x80@1 45x20@1 50x20@1 50x80@1 55x80@1 55x20@1 60x20@1 60x80@1 65x80@1 65x20@1 70x20@1
    70x80@1 75x80@1 75x20@1 80x20@1 80x80@1 – Flat
  • AddButtonStyle All Vector 5 20x20@4 80x20@2 80x80@2 20x80@2 20x20@2 – Flat
  • AddButtonStyle 1 AllActive Vector 9 40x40@4 45x35@2 55x35@2 60x40@2 60x45@2 50x50@2 50x55@2 50x65@4 50x65@2 – Flat
  • AddButtonStyle 2 AllActive Vector 4 40x40@4 60x60@2 60x40@4 40x60@2 – Flat
  • AddButtonStyle 4 AllActive Vector 7 40x40@4 40x60@2 60x60@2 60x40@2 40x40@2 40x45@2 60x45@2 – Flat
  • AddButtonStyle 6 AllActive Vector 5 40x40@4 60x40@2 60x45@2 40x45@2 40x40@2 – Flat
  • AddButtonStyle 8 AllActive Vector 5 40x60@4 60x60@2 60x55@2 40x55@2 40x60@2 – Flat
  • ButtonStyle 1 - MwmDecorMenu
  • ButtonStyle 2 - Clear
  • ButtonStyle 4 - MwmDecorMax
  • ButtonStyle 6 - MwmDecorShade
  • ButtonStyle 8 - Clear
  • BorderStyle – HiddenHandles

DestroyFunc Thumbnail
AddToFunc Thumbnail

  • I ThisWindow (!Iconifiable) Break
  • I Raise
  • I SetEnv iconloc $[FVWM_USERDIR]/tmp/icon.$[w.id].png
  • I Piperead “xwd -silent -id $[w.id] | convert -resize 110x110 xwd:- png:$[iconloc]”
  • I WindowStyle IconOverride, NoIconTitle, Icon $[iconloc], MiniIcon $[iconloc]
  • I UnsetEnv iconloc

DestroyFunc DeThumbnail
AddToFunc DeThumbnail

  • I Iconify off
  • I All (CurrentPage, Iconic) Break

AddToFunc Move-or-Iconify I Raise

  • M Move
  • D Iconify

DestroyFunc ATermHtop
AddToFunc ATermHtop

  • I Exec exec aterm -title “Aterm” -name “Aterm” -sl 3000 -tr +sb -si -sk -fg white -fn -misc-fixed-medium-r-normal---120---c-*-iso8859-2 -sh 60 -fade 70 -g 100x24+0+0 -e htop

DestroyModuleConfig FvwmIconMan: *
*FvwmIconMan: NumManagers 1
*FvwmIconMan: Resolution page
*FvwmIconMan: UseWinList true
*FvwmIconMan: DrawIcons always
*FvwmIconMan: Shape false
*FvwmIconMan: FollowFocus true

*FvwmIconMan: Background steelblue
*FvwmIconMan: Foreground white
*FvwmIconMan: PlainButton flat black steelblue
*FvwmIconMan: SelectButton flat black steelblue
*FvwmIconMan: FocusButton flat black brown
*FvwmIconMan: FocusAndSelectButton flat black brown
*FvwmIconMan: TitleButton flat black steelblue

*FvwmIconMan: 1 Title “”
*FvwmIconMan: 1 IconName “FvwmIconMan: all”
*FvwmIconMan: 1 Format “”
*FvwmIconMan: 1 ShowOnlyIcons false
*FvwmIconMan: 1 ManagerGeometry 0x1+5-5
*FvwmIconMan: 1 ButtonGeometry 120x120

*FvwmIconMan: Action Mouse 0 A sendcommand Nop
*FvwmIconMan: Action Mouse 1 A sendcommand FlipFocus, sendcommand Raise, sendcommand DeThumbnail
*FvwmIconMan: Action Mouse 2 A sendcommand WarpToWindow
*FvwmIconMan: Action Mouse 3 A sendcommand “Module FvwmIdent FvwmIdent”

Style FvwmIconMan NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip, StaysOnBottom

Key F2 A M Exec exec gmrun
Key F3 A M Module FvwmConsole -terminal xterm -bg black -fg white

MenuStyle * Hilight3DThickness 2
MenuStyle * BorderWidth 3
MenuStyle * ItemFormat “|%.5i%.5l%.5i%2.3>%2|”
MenuStyle * Font “xft:Bitstream Vera Sans:bold:size=10”

DestroyDecor DefaultDecor
AddToDecor DefaultDecor

  • ButtonStyle 1 MiniIcon – Flat UseTitleStyle

DestroyMenu Main
AddToMenu Main “Main” Title

  • %16x16-xterm.png%“XTerm” Exec exec xterm -fg white -bg black
  • “”
  • %16x16-gaim.png%“Gaim” Exec exec gaim
  • %16x16-firefox.png%“Firefox” Exec exec firefox
  • %16x16-ooo-writer2.png%“OpenOffice.org Writer” Exec exec oowriter2

DestroyMenu Actions
AddToMenu Actions “Actions” Title

  • “Lock” Exec exec xscreensaver-command -lock
  • “Restart” Restart
  • “Quit” Quit

Mouse 0 1 A FvwmIdent
Mouse 0 2 A DestroyOnHold
Mouse 0 6 A WindowShade toggle
Mouse 0 4 A Maximize
Mouse 2 4 A Maximize 0 100
Mouse 3 4 A Maximize 100 0
Mouse 0 8 A Function ThumbIcon

Mouse 1 R A Menu Main
Mouse 2 R A Menu Actions
Mouse 3 R A Menu MenuFvwmRoot

Mouse 1 I A Move-or-Iconify
Mouse 2 I A Iconify
DestroyFunc ThumbIcon
AddToFunc ThumbIcon

  • I Function Thumbnail
  • I Iconify

DestroyFunc DestroyOnHold
AddToFunc DestroyOnHold

  • I Raise
  • C Close
  • H Destroy
  • H Beep

DestroyModuleConfig FvwmPager: *
*FvwmPager: MiniIcons
*FvwmPager: Geometry -0+0
*FvwmPager: Rows 1
*FvwmPager: Columns 1
*FvwmPager: NoStartIconic
*FvwmPager: NoShapeLabels
*FvwmPager: SmallFont “xft:courier:size=7”
*FvwmPager: Font none
*FvwmPager: WindowLabelFormat “%i”
*FvwmPager: DeskTopScale 25
*FvwmPager: MiniIcons
*FvwmPager: Balloons null
*FvwmPager: BalloonFont “xft:Bitstream Vera Sans:regular:size=10”
*FvwmPager: BalloonBorderWidth 1
*FvwmPager: BalloonYOffset +3
*FvwmPager: BalloonStringFormat “%i”
*FvwmPager: Window3DBorders
*FvwmPager: WindowBorderWidth 1
*FvwmPager: UseSkipList

*FvwmPager: Label 0
*FvwmPager: Label 1

Style “FvwmPager” HandleWidth 1, StaysOnTop, NoTitle, Sticky, CirculateSkipIcon, CirculateSkip, WindowListSkip

DestroyModuleConfig FvwmEvent: *
*FvwmEvent: add_window Thumbnail[/code]
I will look into the other suggestions you made.
Thanks,
-Dizz

I’ll take a guess here. You’re using FvwmButtons. FvwmButtons swallows windows. Before they get swallowed (again – note that by swallowing, they get reparented) they generate a MapNotify event. This triggers your FvwmEvent code and whoops – FVWM no longer knows which context it was called in because the window has disappeared. So it asks you for one – in the shape of a cross hair.

So… What you want do is for each application you swallow add a style line of ‘CirculateSkip’, as in:

Style XClock CirculateSkip

Then, look at your thumbnail function. The very first line reads like this:

ThisWindow (!Iconifiable) Break

… which is fine, but consider also that ThisWindow implies CirculateHit. Try adding something like:

Thiswindow (!CirculateHit, Iconifiable) Break

Note that I am not expecting the above to work at all. In fact, I can’t even see a solution to it, other than changing the order of your StartFunction such that:

AddToFunc StartFunction
+ I   Module FvwmBacker
+ I   Test (Init) Exec exec xscreensaver
+ I   Module FvwmButtons -g 120x$[vp.height]-0-0 FvwmSideButtons
+ I   Module FvwmIconMan
+ I   Schedule 800 Module FvwmEvent

Or somesuch. Note that I doubt using the old trick of ‘Wait foo’ is going to do you any good on the actual FvwmButtons instance since that’s no guarantee that the window it spawns have been swallowed.

– Thomas Adam

It should be possible to add

ThisWindow Nop TestRc (Error) Break
to the start of the Tumbnailing function to force it to work only with a window context.

Nice idea, but I had already thought of something similar myself – it doesn’t work. It’s more likely just going to be a question of timing.

– Thomas Adam