Subject: FVWM: More on undocumented module packets

From: "Randy J. Ray" <[email-masked]>
Date: Wed, 26 Mar 1997 14:14:42 -0700

In my quest to get all the M_* packets documented for my Perl module, I have
been hunting down M_WINDOWSHADE and M_DEWINDOWSHADE.

These packets are sent when a window toggles between shaded states (duh), 
assuming that you enabled shading at build-time. However, these packets don't
really conform to the established standard. Each packet contains only one
value, which looks like the X window ID.

So, why not have these packets return the same identifying triple that
packets like M_LOWER_WINDOW, M_DESTROY_WINDOW, etc. have, or that longer
packets like M_CONFIGURE_WINDOW use as their first three args to identify a
window?

(the code is in builtins.c)

Randy
--
===============================================================================
Randy J. Ray -- U S WEST Technologies IAD/CSS/DPDS         Phone: (303)595-2869
                Denver, CO                                     [email-masked]
"It's not denial. I'm just very selective about the reality I accept." --Calvin
===============================================================================
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Randy J. Ray" <[email-masked]>
Date: Wed, 26 Mar 1997 14:27:44 -0700

Upon consideration, it was pretty cheesy of me to say "I've done all the
tracking work, up to the point of changing code. Even though I know exactly
where the change needs to be, someone else do it."

So attached is a patch to builtins.c that causes the M_WINDOWSHADE and
M_DEWINDOWSHADE packets to transmit 3 values instead of one. The three
values are X Win ID, Frame X Win ID, and Fvwm ID. These are a very standard
triple. Apply with patch -p, from the fvwm sub-dir of your distribution:

*** builtins.c.old	Wed Mar 26 14:19:05 1997
--- builtins.c	Wed Mar 26 14:21:56 1997
***************
*** 400,424 ****
  
      if (((tmp_win->buttons & WSHADE)||(n==2))&&(n!=1))
      {
! 	tmp_win->buttons &= ~WSHADE;
! 	SetupFrame(tmp_win,
! 		   tmp_win->frame_x, 
! 		   tmp_win->frame_y, 
! 		   tmp_win->orig_wd,
! 		   tmp_win->orig_ht,
! 		   True);
!         Broadcast(M_DEWINDOWSHADE, 1, tmp_win->w, 0, 0, 0, 0, 0, 0);
      }
      else
      {
! 	tmp_win->buttons |= WSHADE;
! 	SetupFrame(tmp_win,
! 		   tmp_win->frame_x,
! 		   tmp_win->frame_y,
! 		   tmp_win->frame_width,
! 		   tmp_win->title_height + tmp_win->boundary_width,
! 		   False);
!         Broadcast(M_WINDOWSHADE, 1, tmp_win->w, 0, 0, 0, 0, 0, 0);
      }
  }
  #endif /* WINDOWSHADE */
--- 400,426 ----
  
      if (((tmp_win->buttons & WSHADE)||(n==2))&&(n!=1))
      {
!         tmp_win->buttons &= ~WSHADE;
!         SetupFrame(tmp_win,
!                    tmp_win->frame_x, 
!                    tmp_win->frame_y, 
!                    tmp_win->orig_wd,
!                    tmp_win->orig_ht,
!                    True);
!         Broadcast(M_DEWINDOWSHADE, 3, tmp_win->w, tmp_win->frame,
!                   (unsigned long)tmp_win, 0, 0, 0, 0);
      }
      else
      {
!         tmp_win->buttons |= WSHADE;
!         SetupFrame(tmp_win,
!                    tmp_win->frame_x,
!                    tmp_win->frame_y,
!                    tmp_win->frame_width,
!                    tmp_win->title_height + tmp_win->boundary_width,
!                    False);
!         Broadcast(M_WINDOWSHADE, 3, tmp_win->w, tmp_win->frame,
!                   (unsigned long)tmp_win, 0, 0, 0, 0);
      }
  }
  #endif /* WINDOWSHADE */

Randy