Subject: (long) startup timing bug patch to test

From: "Charles Hines" <[email-masked]>
Date: Thu, 25 Jul 1996 14:06:35 -0400

Howdy all.

Could those of you who are experiencing the troubles with windows
started before fvwm in your .xinitrc not getting style attributes set
correctly please try the enclosed patch and let me know how well it
works for you?

There is miscellaneous other stuff in there too that will be in 2.1.0
as well, but just ignore that for now.

Thanks,
Chuck

--------------->8 '2.0.43-startup-timing-bug-patch' cut here 8<---------------
diff -N -u -r fvwm/add_window.c fvwm/add_window.c
--- fvwm/add_window.c.orig      Thu Apr 11 11:25:58 1996
+++ fvwm/add_window.c   Thu Jul 25 13:11:07 1996
@@ -237,13 +237,13 @@
    * reparented, so we'll get a DestroyNotify for it.  We won't have
    * gotten one for anything up to here, however.
    */
-  XGrabServer(dpy);
+  MyXGrabServer(dpy);
   if(XGetGeometry(dpy, w, &JunkRoot, &JunkX, &JunkY,
                  &JunkWidth, &JunkHeight,
                  &JunkBW,  &JunkDepth) == 0)
     {
       free((char *)tmp_win);
-      XUngrabServer(dpy);
+      MyXUngrabServer(dpy);
       return(NULL);
     }

@@ -484,7 +484,7 @@
     }
   RaiseWindow(tmp_win);
   KeepOnTop();
-  XUngrabServer(dpy);
+  MyXUngrabServer(dpy);

   XGetGeometry(dpy, tmp_win->w, &JunkRoot, &JunkX, &JunkY,
                   &JunkWidth, &JunkHeight, &JunkBW, &JunkDepth);
diff -N -u -r fvwm/builtins.c fvwm/builtins.c
--- fvwm/builtins.c.orig        Thu Jun 27 10:34:19 1996
+++ fvwm/builtins.c     Thu Jul 25 13:11:08 1996
@@ -766,9 +766,16 @@
 {
   XSetWindowAttributes attributes;
   unsigned long valuemask;
-
+
+#if 0
   valuemask = (CWBackPixel);
   attributes.background_pixel = 0;
+#else /* CKH - i'd like to try this a little differently (clear window)*/
+  valuemask = CWOverrideRedirect | CWBackingStore | CWSaveUnder | CWBackPixmap;
+  attributes.override_redirect = True;
+  attributes.save_under = False;
+  attributes.background_pixmap = None;
+#endif
   attributes.backing_store = NotUseful;
   w = XCreateWindow (dpy, Scr.Root, 0, 0,
                     (unsigned int) Scr.MyDisplayWidth,
@@ -847,6 +854,38 @@
 }

+void flip_focus_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+               unsigned long context, char *action, int *Module)
+{
+
+  FvwmWindow *scratch;
+
+  if (DeferExecution(eventp,&w,&tmp_win,&context,SELECT,ButtonRelease))
+    return;
+
+  /* Reorder the window list */
+  if( Scr.Focus ){
+    if( Scr.Focus->next ) Scr.Focus->next->prev = Scr.Focus->prev;
+    if( Scr.Focus->prev ) Scr.Focus->prev->next = Scr.Focus->next;
+    Scr.Focus->next = Scr.FvwmRoot.next;
+    Scr.Focus->prev = &Scr.FvwmRoot;
+    if(Scr.FvwmRoot.next)Scr.FvwmRoot.next->prev = Scr.Focus;
+    Scr.FvwmRoot.next = Scr.Focus;
+  }
+  if( tmp_win != Scr.Focus ){
+    if( tmp_win->next ) tmp_win->next->prev = tmp_win->prev;
+    if( tmp_win->prev ) tmp_win->prev->next = tmp_win->next;
+    tmp_win->next = Scr.FvwmRoot.next;
+    tmp_win->prev = &Scr.FvwmRoot;
+    if(Scr.FvwmRoot.next)Scr.FvwmRoot.next->prev = tmp_win;
+    Scr.FvwmRoot.next = tmp_win;
+  }
+
+  FocusOn(tmp_win,0);
+
+}
+
+
 void focus_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
                unsigned long context, char *action, int *Module)
 {
@@ -1762,7 +1801,7 @@
   Bool needsIconic = 0;
   Bool needsNormal = 0;
   Bool needsCurrentDesk = 0;
-  Bool needsCurrentScreen = 0;
+  Bool needsCurrentPage = 0;
   Bool needsVisible = 0;
   Bool needsInvisible = 0;
   char *AnyWindow = "*";
@@ -1807,12 +1846,18 @@
         needsNormal = 1;
       else if(mystrcasecmp(condition,"CurrentDesk")==0)
         needsCurrentDesk = 1;
+      else if(mystrcasecmp(condition,"CurrentPage")==0)
+      {
+        needsCurrentDesk = 1;
+        needsCurrentPage = 1;
+      }
       else if(mystrcasecmp(condition,"Visible")==0)
         needsVisible = 1;
       else if(mystrcasecmp(condition,"!Visible")==0)
         needsInvisible = 1;
-      else if(mystrcasecmp(condition,"CurrentScreen")==0)
-        needsCurrentScreen = 1;
+      else if(mystrcasecmp(condition,"CurrentPageAnyDesk")==0 ||
+              mystrcasecmp(condition,"CurrentScreen")==0)
+        needsCurrentPage = 1;
       else if(mystrcasecmp(condition,"CirculateHit")==0)
         useCirculateHit = 1;
       else if(mystrcasecmp(condition,"CirculateHitIcon")==0)
@@ -1866,10 +1911,10 @@
            ((!needsCurrentDesk)||(fw->Desk == Scr.CurrentDesk))&&
            ((!needsVisible)||(fw->flags & VISIBLE))&&
            ((!needsInvisible)||(!(fw->flags & VISIBLE)))&&
-           ((!needsCurrentScreen)||((fw->frame_x < Scr.MyDisplayWidth)&&
-                                    (fw->frame_y < Scr.MyDisplayHeight)&&
-                                    (fw->frame_x+fw->frame_width > 0)&&
-                                    (fw->frame_y+fw->frame_height > 0)))))
+           ((!needsCurrentPage)||((fw->frame_x < Scr.MyDisplayWidth)&&
+                                  (fw->frame_y < Scr.MyDisplayHeight)&&
+                                  (fw->frame_x+fw->frame_width > 0)&&
+                                  (fw->frame_y+fw->frame_height > 0)))))
         found = fw;
       else
       {
@@ -1986,7 +2031,7 @@

   PPosOverride = True;
   /* put a border back around all windows */
-  XGrabServer (dpy);
+  MyXGrabServer(dpy);
   tmp = Scr.FvwmRoot.next;
   for(i=0;i<nchildren;i++)
   {
@@ -2027,7 +2072,7 @@
     XFree((char *)children);
   PPosOverride = False;
   KeepOnTop();
-  XUngrabServer (dpy);
+  MyXUngrabServer(dpy);
   XSync(dpy,0);

 }
diff -N -u -r fvwm/events.c fvwm/events.c
--- fvwm/events.c.orig  Mon May 27 15:33:26 1996
+++ fvwm/events.c       Thu Jul 25 13:11:09 1996
@@ -745,7 +745,7 @@
       if(isIconicState != DontCareState)
        state = isIconicState;

-      XGrabServer (dpy);
+      MyXGrabServer(dpy);
       switch (state)
        {
        case DontCareState:
@@ -772,12 +772,19 @@
          break;

        case IconicState:
-         Iconify(Tmp_win, 0, 0);
+         if (Tmp_win->wmhints)
+           {
+             Iconify(Tmp_win, Tmp_win->wmhints->icon_x, Tmp_win->wmhints->icon_y);
+           }
+         else
+           {
+             Iconify(Tmp_win, 0, 0);
+           }
          break;
        }
       if(!PPosOverride)
        XSync(dpy,0);
-      XUngrabServer(dpy);
+      MyXUngrabServer(dpy);
     }
   /* If no hints, or currently an icon, just "deiconify" */
   else
@@ -819,7 +826,7 @@
    * the client would think that the window has a chance of being viewable
    * when it really isn't.
    */
-  XGrabServer (dpy);
+  MyXGrabServer (dpy);
   if (Tmp_win->icon_w)
     XUnmapWindow(dpy, Tmp_win->icon_w);
   if(Tmp_win->icon_pixmap_w != None)
@@ -850,7 +857,7 @@
       SetBorder(Tmp_win,False,True,True,Tmp_win->frame);
     }
   XSync(dpy,0);
-  XUngrabServer (dpy);
+  MyXUngrabServer (dpy);
   XFlush (dpy);
   Tmp_win->flags |= MAPPED;
   Tmp_win->flags &= ~MAP_PENDING;
@@ -924,12 +931,12 @@
       return;
     }

-  XGrabServer(dpy);
+  MyXGrabServer(dpy);

   if(XCheckTypedWindowEvent (dpy, Event.xunmap.window, DestroyNotify,&dummy))
     {
       Destroy(Tmp_win);
-      XUngrabServer (dpy);
+      MyXUngrabServer (dpy);
       return;
     }

@@ -975,7 +982,7 @@
                              EnterWindowMask | LeaveWindowMask, &dummy));
       */
     } /* else window no longer exists and we'll get a destroy notify */
-  XUngrabServer (dpy);
+  MyXUngrabServer(dpy);

   XFlush (dpy);
 }
diff -N -u -r fvwm/functions.c fvwm/functions.c
--- fvwm/functions.c.orig       Wed Jun 19 20:01:56 1996
+++ fvwm/functions.c    Thu Jul 25 13:11:09 1996
@@ -55,6 +55,7 @@
   {"EdgeResistance",SetEdgeResistance,F_EDGE_RES,           FUNC_NO_WINDOW},
   {"Exec",         exec_function,    F_EXEC,                FUNC_NO_WINDOW},
   {"ExecUseSHELL", exec_setup,       F_EXEC_SETUP,          FUNC_NO_WINDOW},
+  {"FlipFocus",    flip_focus_func,  F_FLIP_FOCUS,          FUNC_NEEDS_WINDOW},
   {"Focus",        focus_func,       F_FOCUS,               FUNC_NEEDS_WINDOW},
   {"Function",     ComplexFunction,  F_FUNCTION,            FUNC_NO_WINDOW},
   {"GotoPage",     goto_page_func,   F_GOTO_PAGE,           FUNC_NO_WINDOW},
diff -N -u -r fvwm/fvwm.c fvwm/fvwm.c
--- fvwm/fvwm.c.orig    Thu Jun 27 10:08:08 1996
+++ fvwm/fvwm.c Thu Jul 25 13:11:09 1996
@@ -227,31 +227,31 @@

     strcpy(message, XDisplayString(dpy));

-    XCloseDisplay(dpy);
-
-    for(i=1;i<Scr.NumberOfScreens;i++)
+    for(i=0;i<Scr.NumberOfScreens;i++)
     {
-      if (fork() == 0)
+      if (i != Scr.screen && fork() == 0)
       {
         myscreen = i;
+
+        /*
+         * Truncate the string 'whatever:n.n' to 'whatever:n',
+         * and then append the screen number.
+         */
+        cp = strchr(message, ':');
+        if (cp != NULL)
+        {
+          cp = strchr(cp, '.');
+          if (cp != NULL)
+            *cp = '\0';                /* truncate at display part */
+        }
+        sprintf(message + strlen(message), ".%d", myscreen);
+        dpy = XOpenDisplay(message);
+        Scr.screen = myscreen;
+        Scr.NumberOfScreens = ScreenCount(dpy);
+
         break;
       }
     }
-    /*
-     * Truncate the string 'whatever:n.n' to 'whatever:n',
-     * and then append the screen number.
-     */
-    cp = strchr(message, ':');
-    if (cp != NULL)
-    {
-      cp = strchr(cp, '.');
-      if (cp != NULL)
-        *cp = '\0';            /* truncate at display part */
-    }
-    sprintf(message + strlen(message), ".%d", myscreen);
-    dpy = XOpenDisplay(message);
-    Scr.screen = myscreen;
-    Scr.NumberOfScreens = ScreenCount(dpy);
   }

   x_fd = XConnectionNumber(dpy);
@@ -330,6 +330,8 @@

   XSetErrorHandler((XErrorHandler)FvwmErrorHandler);

+  MyXGrabServer(dpy);
+
   BlackoutScreen();

   CreateCursors();
@@ -436,12 +438,10 @@
   initPanFrames();
 #endif

-  XGrabServer(dpy);
-
 #ifndef NON_VIRTUAL
   checkPanFrames();
 #endif
-  XUngrabServer(dpy);
+  MyXUngrabServer(dpy);
   UnBlackoutScreen();
   DBUG("main","Entering HandleEvents loop...");
   HandleEvents();
@@ -1034,7 +1034,7 @@
   FvwmWindow *tmp;                     /* temp fvwm window structure */

   /* put a border back around all windows */
-  XGrabServer (dpy);
+  MyXGrabServer (dpy);

   InstallWindowColormaps (&Scr.FvwmRoot);      /* force reinstall */
   for (tmp = Scr.FvwmRoot.next; tmp != NULL; tmp = tmp->next)
@@ -1044,7 +1044,7 @@
     XDestroyWindow(dpy,tmp->frame);
   }

-  XUngrabServer (dpy);
+  MyXUngrabServer (dpy);
   XSetInputFocus (dpy, PointerRoot, RevertToPointerRoot,CurrentTime);
   XSync(dpy,0);

diff -N -u -r fvwm/misc.h fvwm/misc.h
--- fvwm/misc.h.orig    Wed Jun 19 21:31:15 1996
+++ fvwm/misc.h Thu Jul 25 13:11:10 1996
@@ -384,6 +384,8 @@
               unsigned long context,char *action, int *Module);
 void raise_it_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
                   unsigned long context, char *action, int *Module);
+void flip_focus_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+               unsigned long context, char *action, int *Module);
 void focus_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
                unsigned long context, char *action, int *Module);
 void warp_func(XEvent *eventp,Window w,FvwmWindow *tmp_win,
diff -N -u -r fvwm/move.c fvwm/move.c
--- fvwm/move.c.orig    Fri Jun 30 11:06:01 1995
+++ fvwm/move.c Thu Jul 25 13:11:10 1996
@@ -111,7 +111,7 @@
 {
   Bool finished = False;
   Bool done;
-  int xl,yt,delta_x,delta_y;
+  int xl,yt,delta_x,delta_y,paged;

   XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,&xl, &yt,
                &JunkX, &JunkY, &JunkMask);
@@ -202,8 +202,8 @@
        case MotionNotify:
          xl = Event.xmotion.x_root;
          yt = Event.xmotion.y_root;
-         HandlePaging(Scr.MyDisplayWidth,Scr.MyDisplayHeight,&xl,&yt,
-                      &delta_x,&delta_y,False);
+/*       HandlePaging(Scr.MyDisplayWidth,Scr.MyDisplayHeight,&xl,&yt,
+                      &delta_x,&delta_y,False);  mab */
          /* redraw the rubberband */
          xl += XOffset;
          yt += YOffset;
@@ -220,6 +220,11 @@
          if((yt <= 0)&&(yt > -Scr.MoveResistance))
            yt = 0;

+       /* check Paging request once and only once after outline redrawn */
+       /* redraw after paging if needed - mab */
+       paged=0;
+       while(paged<=1)
+        {
          if(!opaque_move)
            MoveOutline(Scr.Root, xl, yt, Width,Height);
          else
@@ -242,6 +247,21 @@
                XMoveWindow(dpy,tmp_win->frame,xl,yt);
            }
          DisplayPosition(tmp_win,xl+Scr.Vx,yt+Scr.Vy,False);
+
+/* prevent window from lagging behind mouse when paging - mab */
+         if(paged==0)
+           {
+           xl = Event.xmotion.x_root;
+           yt = Event.xmotion.y_root;
+           HandlePaging(Scr.MyDisplayWidth,Scr.MyDisplayHeight,&xl,&yt,
+                      &delta_x,&delta_y,False);
+           xl += XOffset;
+           yt += YOffset;
+           if ( (delta_x==0) && (delta_y==0)) break; /* break from while paged */
+           }
+         paged++;
+        }  /* end while paged */
+
          done = TRUE;
          break;

@@ -420,7 +440,7 @@
      (Scr.OpaqueSize*Scr.MyDisplayWidth*Scr.MyDisplayHeight)/100)
     opaque_move = True;
   else
-    XGrabServer(dpy);
+    MyXGrabServer(dpy);

   if((!opaque_move)&&(tmp_win->flags & ICONIFIED))
     XUnmapWindow(dpy,w);
@@ -437,7 +457,7 @@
   UninstallRootColormap();

   if(!opaque_move)
-    XUngrabServer(dpy);
+    MyXUngrabServer(dpy);
   UngrabEm();

 }
diff -N -u -r fvwm/parse.h fvwm/parse.h
--- fvwm/parse.h.orig   Thu May 30 14:03:10 1996
+++ fvwm/parse.h        Thu Jul 25 13:11:10 1996
@@ -89,6 +89,7 @@
 #define F_SEND_STRING           112
 #define F_ADD_MOD               113
 #define F_DESTROY_MOD           114
+#define F_FLIP_FOCUS            115

 /* Functions for use by modules only! */
 #define F_SEND_WINDOW_LIST     1000
diff -N -u -r fvwm/placement.c fvwm/placement.c
--- fvwm/placement.c.orig       Mon Apr 24 14:14:08 1995
+++ fvwm/placement.c    Thu Jul 25 13:11:11 1996
@@ -230,14 +230,14 @@
              if(GrabEm(POSITION))
                {
                  /* Grabbed the pointer - continue */
-                 XGrabServer(dpy);
+                 MyXGrabServer(dpy);
                  if(XGetGeometry(dpy, tmp_win->w, &JunkRoot, &JunkX, &JunkY,
                                  (unsigned int *)&DragWidth,
                                  (unsigned int *)&DragHeight,
                                  &JunkBW,  &JunkDepth) == 0)
                    {
                      free((char *)tmp_win);
-                     XUngrabServer(dpy);
+                     MyXUngrabServer(dpy);
                      return False;
                    }
                  DragWidth = tmp_win->frame_width;
@@ -247,7 +247,7 @@
                  moveLoop(tmp_win,0,0,DragWidth,DragHeight,
                           &xl,&yt,False,True);
                  XUnmapWindow(dpy,Scr.SizeWindow);
-                 XUngrabServer(dpy);
+                 MyXUngrabServer(dpy);
                  UngrabEm();
                }
              else
diff -N -u -r fvwm/resize.c fvwm/resize.c
--- fvwm/resize.c.orig  Fri Jun 30 11:07:23 1995
+++ fvwm/resize.c       Thu Jul 25 13:11:11 1996
@@ -108,7 +108,7 @@
       return;
     }

-  XGrabServer(dpy);
+  MyXGrabServer(dpy);

   /* handle problems with edge-wrapping while resizing */
@@ -214,15 +214,21 @@
        case MotionNotify:
          x = Event.xmotion.x_root;
          y = Event.xmotion.y_root;
+         /* resize before paging request to prevent resize from lagging mouse - mab */
+         DoResize(x, y, tmp_win);
          /* need to move the viewport */
          HandlePaging(Scr.EdgeScrollX,Scr.EdgeScrollY,&x,&y,
                       &delta_x,&delta_y,False);
+       /* redraw outline if we paged - mab */
+       if ( (delta_x != 0) || (delta_y != 0) )
+         {
          origx -= delta_x;
          origy -= delta_y;
          dragx -= delta_x;
          dragy -= delta_y;

          DoResize(x, y, tmp_win);
+         }
          done = TRUE;
        default:
          break;
@@ -253,7 +259,7 @@
     }
   UninstallRootColormap();
   ResizeWindow = None;
-  XUngrabServer(dpy);
+  MyXUngrabServer(dpy);
   UngrabEm();
   xmotion = 0;
   ymotion = 0;
diff -N -u -r fvwm/virtual.c fvwm/virtual.c
--- fvwm/virtual.c.orig Wed Apr 24 11:45:27 1996
+++ fvwm/virtual.c      Thu Jul 25 13:11:12 1996
@@ -42,6 +42,10 @@
     {
       sleep_a_little(10000);
       total+=10;
+
+  XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
+               &x, &y, &JunkX, &JunkY, &JunkMask);
+
       if(XCheckWindowEvent(dpy,Scr.PanFrameTop.win,
                           LeaveWindowMask,&Event))
        {
@@ -66,6 +70,11 @@
          StashEventTime(&Event);
          return;
        }
+      /* check actual pointer location since PanFrames can get buried under
+         a window being moved or resized - mab */
+      if(( x >= SCROLL_REGION )&&( x < Scr.MyDisplayWidth-SCROLL_REGION )&&
+         ( y >= SCROLL_REGION )&&( y < Scr.MyDisplayHeight-SCROLL_REGION ))
+           return ;
     }

   XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
@@ -162,13 +171,13 @@
   if((*delta_x != 0)||(*delta_y!=0))
     {
       if(Grab)
-       XGrabServer(dpy);
+       MyXGrabServer(dpy);
       XWarpPointer(dpy,None,Scr.Root,0,0,0,0,*xl,*yt);
       MoveViewport(Scr.Vx + *delta_x,Scr.Vy + *delta_y,False);
       XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
                    xl, yt, &JunkX, &JunkY, &JunkMask);
       if(Grab)
-       XUngrabServer(dpy);
+       MyXUngrabServer(dpy);
     }
 }

@@ -344,7 +353,7 @@
   int deltax,deltay;

   if(grab)
-    XGrabServer(dpy);
+    MyXGrabServer(dpy);

   if(newx > Scr.VxMax)
@@ -412,7 +421,7 @@
   while(XCheckTypedEvent(dpy,MotionNotify,&Event))
     StashEventTime(&Event);
   if(grab)
-    XUngrabServer(dpy);
+    MyXUngrabServer(dpy);
 }

@@ -452,7 +461,7 @@
   Broadcast(M_NEW_DESK,1,Scr.CurrentDesk,0,0,0,0,0,0);
   /* Scan the window list, mapping windows on the new Desk,
    * unmapping windows on the old Desk */
-  XGrabServer(dpy);
+  MyXGrabServer(dpy);
   for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
     {
       /* Only change mapping for non-sticky windows */
@@ -487,7 +496,7 @@
            }
        }
     }
-  XUngrabServer(dpy);
+  MyXUngrabServer(dpy);
   for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
     {
       /* If its an icon, and its sticking, autoplace it so
diff -N -u -r libs/Grab.c libs/Grab.c
--- libs/Grab.c.orig    Wed Dec 31 19:00:00 1969
+++ libs/Grab.c Thu Jul 25 13:13:21 1996
@@ -0,0 +1,30 @@
+/*
+** MyXGrabServer & MyXUngrabServer - to handle nested grab server calls
+*/
+
+#include <X11/Xlib.h>
+
+static int xgrabcount = 0;
+
+void MyXGrabServer(Display *disp)
+{
+  if (xgrabcount == 0)
+  {
+    XGrabServer(disp);
+  }
+  ++xgrabcount;
+}
+
+void MyXUngrabServer(Display *disp)
+{
+  if (--xgrabcount < 0) /* should never happen */
+  {
+    /* fvwm_msg(ERR,"MyXUngrabServer","too many ungrabs!\n"); */
+    xgrabcount = 0;
+  }
+  if (xgrabcount == 0)
+  {
+    XUngrabServer(disp);
+  }
+}
+
diff -N -u -r libs/Imakefile libs/Imakefile
--- libs/Imakefile.orig Fri Feb 16 20:17:27 1996
+++ libs/Imakefile      Thu Jul 25 13:11:56 1996
@@ -10,6 +10,7 @@
        GetFdWidth.c \
        GetFont.c \
        GetLine.c \
+       Grab.c \
        Picture.c \
        ReadPacket.c \
        SendInfo.c \
@@ -31,6 +32,7 @@
        GetFdWidth.o \
        GetFont.o \
        GetLine.o \
+       Grab.o \
        Picture.o \
        ReadPacket.o \
        SendInfo.o \
diff -N -u -r libs/fvwmlib.h libs/fvwmlib.h
--- libs/fvwmlib.h.orig Fri Mar 22 15:32:33 1996
+++ libs/fvwmlib.h      Thu Jul 25 13:11:24 1996
@@ -39,4 +39,7 @@

 XFontStruct *GetFontOrFixed(Display *disp, char *fontname);

+void MyXGrabServer(Display *disp);
+void MyXUngrabServer(Display *disp);
+
 #endif
diff -N -u -r version.h version.h
--- version.h.orig      Tue Apr 16 16:11:51 1996
+++ version.h   Thu Jul 25 13:17:42 1996
@@ -1,2 +1,2 @@
-#define VERSION "2.0.43"
+#define VERSION "2.0.43a"

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Manoj Kasichainula <[email-masked]>
Date: Thu, 25 Jul 1996 16:36:22 -0400 (EDT)

First, to apply this patch, you'll need to use the flag on patch to ignore
whitespace. Using GNU patch, this is -l (ell, not one)

Now, I've applied this patch, but I'm still getting the same timing
problem with a window not getting Style flags. :(

I do have an addition to report. I've noticed that other WM functions
don't seem to work inside the Style-less window. For examle, I have
Meta-F1 bound to restart the WM everywhere, including inside windows.
However, when I was focused in and my mouse was in the Styleless window,
Meta-F1 wasn't caught by fvwm, but passed to the window (an rxvt). In an
rxvt with all it's Style attributes, however, the restart with Meta-F1
succeeds.

Again, for debugging purposes, my fvwm2rc can be found at
http://dosa.ini.cmu.edu/~manojk/fvwm2rc. 

_________________________________________________________________________
Manoj Kasichainula - [email-masked] | "Violence is the first refuge
http://dosa.ini.cmu.edu/~manojk/           |  of the violent."
Finger for PGP public key & Geek Code      |     - Aaron Allston

---

From: Manoj Kasichainula <[email-masked]>
Date: Thu, 25 Jul 1996 16:38:43 -0400 (EDT)

> rxvt with all it's Style attributes, however, the restart with Meta-F1

Acck. Just reread the message. The addition is to myu previous bug
reports. I don't think this new behavior started with the posted patch.

---

From: "Charles Hines" <[email-masked]>
Date: Thu, 25 Jul 1996 17:02:07 -0400

>>>>> "Manoj" == Manoj Kasichainula <[email-masked]> writes:

Manoj> First, to apply this patch, you'll need to use the flag on
Manoj> patch to ignore whitespace. Using GNU patch, this is -l (ell,
Manoj> not one)

Odd.  I didn't have to when I checked it before I sent it out.

Manoj> Now, I've applied this patch, but I'm still getting the same
Manoj> timing problem with a window not getting Style flags. :(

Damn.  Not what I wanted to hear...

Just out of curiousity, when are these windows popping up?  Is it
while fvwm is rebordering the windows (which shouldn't be happening
now, but what I had suspected of being the original problem), or
before or after that seems to start/stop?

Chuck

---

From: Manoj Kasichainula <[email-masked]>
Date: Fri, 26 Jul 1996 05:16:39 -0400 (EDT)

> Damn.  Not what I wanted to hear...

Me neither. :)

> before or after that seems to start/stop?

Here's a sequence of events that I have found so far. My startup is pretty
fast at home (Yay Linux!), but I'll try this on a slow school machine if I
get a chance, to get more detail on the seq. of events and try different
combinations. 

0. There is an xconsole open on the screen while xdm is waiting for login.

1. I login. xconsole is not killed.

2. rxvt pops up with minimal dark-gray decorations.

3. xconsole is iconified (StartIconic in fvwm2rc)

4. modules pop up

Here are all the details I've come up with on this poor unloved window:

- Titlebar has no buttons.

- Dark gray decorations

- mouse bindings (Meta-mouse3) seem to work on unloved window decorations

- key bindings (Meta-F1) fail with focus on the unloved window itself (W
in fvwm2rc) 

- Restart fixes all problems

I think this covers all the symptoms. Once again, my fvwm2rc:

http://dosa.ini.cmu.edu/~manojk/fvwm2rc

_________________________________________________________________________
Manoj Kasichainula - [email-masked] | "Life is like an analogy."
http://dosa.ini.cmu.edu/~manojk/           |
Finger for PGP public key & Geek Code      |     - Aaron Allston