Subject: FvwmWinlist bug

From: Brad Giaccio <[email-masked]>
Date: Wed, 3 Feb 1999 13:03:08 -0500

I know this should go in jitterbug but I keep getting server not responding
when I hit submit.  Jason??

So here is what I typed.

--------------
I have a very reproducible problem remove any refrences to 
FvwmWinList*NoAnchor from your config file
start FvwmWinList
then in a widnow type xterm
Everythings seems okay but go back to the window you started from and Ctrl-C
Congradulations you just hung your X server. If you want to get out click on any 
button in the WinList. Which suggests it is waitng for some event a stack trace of 
fvwm shows it in an XSync call in the focus code.  A trace of FvwmWinList shows it in
poll --> select --> MainLoop

If I use NoAnchor the problem disappears but I don't see anyhting wrong with the code
that refrences this.  The behavior is better but not perfect in 2.1.8. There the server 
doesn't block the window list just doesn't update until some window puts out an exit 
or enter event.

I don't see any obvious changes looking at the logs and diffs between the versions so,
maybe someone who was working the signa; stuff can take a look.

Brad
-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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: Jason L Tibbitts III <[email-masked]>
Date: 03 Feb 1999 13:12:43 -0600

>>>>> "BG" == Brad Giaccio <[email-masked]> writes:

BG> I know this should go in jitterbug but I keep getting server not
BG> responding when I hit submit.  Jason??

No problem whatsoever here.  Sorry.

 - J<

---

From: [email-masked] (Paul D. Smith)
Date: 03 Feb 1999 14:13:07 -0500

What version did you test with?

There are known FvwmWinList issues with 2.1.10, but they should be
resolved in 2.1.11 or the latest CVS stuff.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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: Brad Giaccio <[email-masked]>
Date: Wed, 3 Feb 1999 14:28:04 -0500

> resolved in 2.1.11 or the latest CVS stuff.

Forgot to retype that part I'm talking current as of right now CVS sources.

Brad

---

From: Tim Phipps <[email-masked]>
Date: Thu, 04 Feb 1999 09:37:17 +0000

> Forgot to retype that part I'm talking current as of right now CVS sources.

I can't reproduce this.  FvwmWinList does grab the server though. Could
you commanet out the grab/ungrab lines and see if the problem goes away.
They are at lines 756 and 769 of FvwmWinList.c>  Here's the section:

      MyXGrabServer(dpy);
      frame = find_frame_window(win, &off_x, &off_y);
      XGetWindowAttributes(dpy, frame, &frame_attr);
      XGetWindowAttributes(dpy, win, &win_attr);
      win_x = frame_attr.x + frame_attr.border_width + off_x;
      win_y = frame_attr.y + frame_attr.border_width + off_y;

      if (win_grav == SouthEastGravity || win_grav == NorthEastGravity)
        win_x += win_attr.width - new_width;
      if (win_grav == SouthEastGravity || win_grav == SouthWestGravity)
        win_y += win_attr.height - new_height;

      XMoveResizeWindow(dpy, win, win_x, win_y, new_width, new_height);
      MyXUngrabServer(dpy);

The reason for the grab is so that FvwmWinList can grow/shrink without
wandering even during a recapture or move.

Cheers,
Tim.

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 4 Feb 1999 09:31:15 -0500

> They are at lines 756 and 769 of FvwmWinList.c>  Here's the section:

Tim,
	Unfortunatelly I tried that it doesn't seem to help I through in some printf's and it doesn't actually get to that function yet.  I was hoping someone else could reproduce before I rip my hair out.  But I'll keep looking.  I actually didn't find the bug it was one of the masses who uses my instilation of fvwm2.  To reproduce I had to phisically exit out and then restart fvwm without the NoAnchor.  Oh well I keep trying

Brad

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 4 Feb 1999 12:28:33 -0500

On Thu, Feb 04, 1999 at 09:31:15AM -0500, Brad Giaccio wrote:
> 	Unfortunatelly I tried that it doesn't seem to help I through
> in some printf's and it doesn't actually get to that function yet.
> I was hoping someone else could reproduce before I rip my hair out.
> But I'll keep looking.  I actually didn't find the bug it was one of
> the masses who uses my instilation of fvwm2.  To reproduce I had to
> phisically exit out and then restart fvwm without the NoAnchor.  Oh
> well I keep trying Brad

Okay I went back and played some more and think I fixed the problem.
It seems and this is weird that the problem only occurs if you just
run fvwm2 with no args from your xinitrc, I know that is weird but I
don't make up the rules I just get confused by them

The change to ButtonArray.c can probably go in anyway as for the
XGrabServer I'm not sure why it is causing a problem.

-----
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmWinList/ButtonArray.c,v
retrieving revision 1.8
diff -u -B -b -r1.8 ButtonArray.c
--- ButtonArray.c       1999/01/18 15:09:32     1.8
+++ ButtonArray.c       1999/02/04 17:23:11
@@ -390,8 +390,11 @@
   Button *btn;

   btn = find_n(array, butnum);
+  if( btn != NULL)
+  {
   btn->up =!btn->up;
   btn->needsupdate=1;
+  }
   DrawButtonArray(array, 0);
 }

Index: FvwmWinList.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmWinList/FvwmWinList.c,v
retrieving revision 1.14
diff -u -B -b -r1.14 FvwmWinList.c
--- FvwmWinList.c       1999/01/18 15:09:32     1.14
+++ FvwmWinList.c       1999/02/04 17:23:11
@@ -753,7 +753,7 @@
     if (Anchor)
     {
       off_x = off_y = 0;
-      MyXGrabServer(dpy);
+/*      MyXGrabServer(dpy);*/
       frame = find_frame_window(win, &off_x, &off_y);
       XGetWindowAttributes(dpy, frame, &frame_attr);
       XGetWindowAttributes(dpy, win, &win_attr);
@@ -766,7 +766,7 @@
         win_y += win_attr.height - new_height;

       XMoveResizeWindow(dpy, win, win_x, win_y, new_width, new_height);
-      MyXUngrabServer(dpy);
+/*      MyXUngrabServer(dpy);*/
     }
     else
       XResizeWindow(dpy, win, new_width, new_height);