On Thu, Jan 31, 2002 at 03:31:19AM +0100, Dominik Vogt wrote: > With my latest changes, it's possible to implement autohiding > using FvwmEvent with the enter_window/leave_window events, the > Schedule command and the State command. This example uses > WindowShade to hide two windows called "FvwmButtons" and > "XMessages" automatically. If title button 8 is pressed (sorry, > no visual feedback yet), the window is locked in unhidden state. > This should work with any focus policy. > > What I like especially about this it that it was trivial to > implement (the C code, not the complex functions). > > Any comments? >
I begun to try this. Your example work fine here. So, I try to modify it for my need. I get a core dump with: DestroyModuleConfig FvwmEvent-Auto: * *FvwmEvent-Auto: PassId *FvwmEvent-Auto: enter_window "autohide_window" *FvwmEvent-Auto: leave_window "autohide_window" DestroyFunc show_window AddToFunc show_window + I Deschedule $0 + I WindowId $1 Raise DestroyFunc check_raise AddToFunc check_raise + I PointerWindow ($0) Schedule $1 $2 show_window $2 $3 DestroyFunc autohide_window AddToFunc autohide_window + I check_raise FvwmButtons 500 101 $0 If I remove "+ I Deschedule $0" I've no more a core dump (I am not sure that this deschedule is useful) but the things does not work fine. I've added an Echo $1 in show_window and it seems that PointerWindow($0) does not respect the $0 condition and also FvwmEvent send strange window id sometimes. here the core dump: [EMAIL PROTECTED] olivier]$ gdb fvwm2 core GNU gdb 4.18 Core was generated by `fvwm2 -f themes-rc'. Program terminated with signal 11, Erreur de segmentation. Reading symbols from /opt/X11R6/lib/libXpm.so.4...done. Reading symbols from /usr/local/lib/libstroke.so.0...done. Reading symbols from /opt/X11R6/lib/libSM.so.6...done. Reading symbols from /opt/X11R6/lib/libICE.so.6...done. Reading symbols from /opt/X11R6/lib/libXext.so.6...done. Reading symbols from /opt/X11R6/lib/libX11.so.6...done. Reading symbols from /lib/libm.so.6...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/libdl.so.2...done. Reading symbols from /lib/ld-linux.so.2...done. Reading symbols from /opt/X11R6/lib/X11/locale/common/xlcDef.so.2...done. Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Reading symbols from /opt/X11R6/lib/X11/locale/common/xomGeneric.so.2...done. #0 0x401975af in free () from /lib/libc.so.6 (gdb) where #0 0x401975af in free () from /lib/libc.so.6 #1 0x80966cb in execute_obj_func (object=0x8182738, args=0xbffff368) at schedule.c:186 #2 0x809f8a6 in fqueue_remove_or_operate_all (fq=0x80ab20c, operate_func=0x80965f0 <execute_obj_func>, operate_args=0xbffff368) at queue.c:253 #3 0x8096738 in squeue_execute () at schedule.c:206 #4 0x806ca26 in My_XNextEvent (dpy=0x80b5d58, event=0x80acc60) at events.c:2917 #5 0x806cc87 in HandleEvents () at events.c:3051 #6 0x808dc5d in main (argc=3, argv=0xbffff944) at fvwm.c:715 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]