FVWM: pager manipulation

From: Victor Eijkhout <eijkhout_at_cs.utk.edu>
Date: Wed, 20 Mar 2002 15:49:43 -0500

I'm trying to add/delete desktops dynamically.

This is a form for adding a desktop:
DestroyModuleConfig AddDesk: *
*AddDesk: WarpPointer
*AddDesk: Line left
*AddDesk: Text "Add new desktop:"
*AddDesk: Line expand
*AddDesk: Input deskname 20 ""
*AddDesk: Button quit "OK" ^M
*AddDesk: Command Exec cd $HOME/.fvwm ; \
     echo *FvwmPager: Label $d \"$(deskname)\" >> page_labels ; \
     sort_labels ; count_desks
*AddDesk: Command restart_pager
*AddDesk: Button quit "Cancel"

It calls two shell scripts to keep the labels sorted, and to update
the number of desks in the Module FvwmPager command, which is also in
a separate file.

Restarting the pager goes like this:

DestroyFunc restart_pager
AddToFunc restart_pager
+ "I" KillModule FvwmPager
+ "I" DestroyModuleConfig FvwmPager
+ "I" Read $[HOME]/.fvwm/pager_start
+ "I" Read $[HOME]/.fvwm/pager_style
+ "I" Read $[HOME]/.fvwm/page_labels

The problem is that the pager gets killed and restarted, but it
doesn't have its proper size. It shows up without the extra desk,
even though the configuration files that are supposed to get read do
show the right number.

The weird thing is that if I again issue the restart_pager command

DestroyMenu desktops
AddToMenu desktops "Desktop" Title
+ "Add new desk" AddNewDesk
+ "Name this desk" NameThisDesk
+ "Remove this desk" RemoveThisDesk
+ "Restart pager" restart_pager

the new size does become effective. I've tried all sorts of things
and I don't understand what's happening here.

-- 
Victor Eijkhout <eijkhout_at_cs.utk.edu>
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/
--
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 Wed Mar 20 2002 - 14:50:05 GMT

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