Subject: FVWM: Two small bugs in fvwm-2.0.42

From: [email-masked]
Date: Wed, 17 Apr 1996 10:36:55 +0200 (MET DST)

Hi,

I've found two small bugs in fvwm-2.0.42.

1. In Fvwm.tmpl the variable CFLAGS is set to the value of FvwmCompilerFlags
   if the latter has been defined.  This overwrites the old value which
   included $(ALLDEFINES) and thus removes any -I and -D switches to the
   compiler.  Using CCOPTIONS instead of CFLAGS seems more appropriate to me.

2. SunOS 4.1.3 doesn't have a strerror() function (called in builtins.c), at
   least not the machine I tried.  So linking fvwm failed.  It does however
   have an array sys_errlist that contains the system error messages.  The
   following patch fixes the problem.

*** builtins.c.~1~	Wed Apr 10 19:38:25 1996
--- builtins.c	Wed Apr 17 08:31:02 1996
***************
*** 663,669 ****
--- 663,675 ----
    {
      if (execl(exec_shell_name, exec_shell_name, "-c", cmd, NULL)==-1)
      {
+ #if defined __sun__ && !defined SYSV
+       extern char *sys_errlist[];
+ 
+       fvwm_msg(ERR,"exec_function","execl failed (%s)",sys_errlist[errno]);
+ #else
        fvwm_msg(ERR,"exec_function","execl failed (%s)",strerror(errno));
+ #endif
        exit(100);
      }
    }

Pieter

--

Pieter Vosbeek                                    E-mail: [email-masked]
Department of Mechanical Engineering                    Phone: +31 40 247 28 27
Eindhoven University of Technology                        Fax: +31 40 244 73 55
P.O. Box 513, 5600 MB Eindhoven, The Netherlands         Home: +31 77 472 12 02
--
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: Andrew Veliath <[email-masked]>
Date: Wed, 17 Apr 1996 13:17:22 -0400

>>>>>  The Emperor, with all his courtesy, exclaimed:
>>>>> "All gasp at the words of the skillful pieter !"

    Pieter> 1. In Fvwm.tmpl the variable CFLAGS is set to the value of
    Pieter> FvwmCompilerFlags if the latter has been defined.  This
    Pieter> overwrites the old value which included $(ALLDEFINES) and
    Pieter> thus removes any -I and -D switches to the compiler.
    Pieter> Using CCOPTIONS instead of CFLAGS seems more appropriate
    Pieter> to me.

This is only my opinion, but I think CDEBUGFLAGS would be even better,
since if it is defined it would override any optimization flags.  It
is handy for setting debugging flags, and even gets passed down the
environment (however, since Fvwm.tmpl is included, it might not be
neccessary) if you specify the following in the Imakefile (BTW Chuck
knows about this already):

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

About the strerror, I couldn't even find str_errlist on SunOS 4.1.1
(!) so I just replaced it with "sorry!" ;) so it would compile.

PC sellers are Bill collectors.
Andrew Veliath <[email-masked]>
http://www.rpi.edu/~veliaa
Finger for PGP Key
--
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: [email-masked]
Date: Thu, 18 Apr 1996 10:17:48 +0200 (MET DST)

> knows about this already):

I'm sorry.  I wasn't subscribed to this list when I sended this message
so I haven't followed the discussion.

> About the strerror, I couldn't even find str_errlist on SunOS 4.1.1

You may have misspelled it.  It's called sys_errlist.  It's manual page
on 4.1.3 says

   Sun Release 4.1   Last change: 6 December 1988 

so it's been there for quite a long time.

Pieter

--

---

From: Andrew Veliath <[email-masked]>
Date: Thu, 18 Apr 1996 04:54:34 -0400

>>>>>  Micky Mouse, with all his might, informed:
>>>>> "All go shopping at the words of the skillful Kai Grossjohann!"

    Andrew> About the strerror, I couldn't even find str_errlist on
    Andrew> SunOS 4.1.1 (!) so I just replaced it with "sorry!" ;) so
    Andrew> it would compile.

    Kai> sys_errlist.  ^^

Most likely did misspell ;), better luck next time I guess ;)... (I
still like my "solution" though ;)

---

From: Andrew Veliath <[email-masked]>
Date: Thu, 18 Apr 1996 04:59:20 -0400

>>>>>  Frankenstein, with all his power, complained:
>>>>> "All feel wholesome at the words of the android pieter !"

    >> This is only my opinion, but I think CDEBUGFLAGS would be even
    >> better, since if it is defined it would override any
    >> optimization flags.  It is handy for setting debugging flags,
    >> and even gets passed down the environment (however, since
    >> Fvwm.tmpl is included, it might not be neccessary) if you
    >> specify the following in the Imakefile (BTW Chuck knows about
    >> this already):

    Pieter> I'm sorry.  I wasn't subscribed to this list when I sended
    Pieter> this message so I haven't followed the discussion.

No worry, don't think it came up only more than once or twice before.
Forgot to add the smile in the last sentence in that paragraph ;)...

Anyone still experience the sticky windows problem?  I find it much
more pronounced when the system is under load.

Regards,

---

From: Romano Giannetti <[email-masked]>
Date: Thu, 18 Apr 1996 20:22:35 +0200 (MET DST)

> more pronounced when the system is under load.

I do not remember if I posted it here this one. If it's a repetition, 
please bear with me. If anyone have the time and skills to debug it (I 
helped to find some bug in Jarl button's, but fvwm is too much for me), 
I know how to trigger the "glued-to-the-mouse" effect. I hope that my 
english will suffice to explain. I assume 

AddToFunc "Move-or-Raise" "I" Raise
+                         "M" Move
+                         "D" RaiseLower

and 

Mouse 1         T       A       Function "Move-or-Raise"  

Go to the title bar. Click. Pointer became a black dot. Wait, and after a 
while it is tranformed in a "four-arrows" one. Now, if you repeat the 
procedure and could  release the  button just at the same time the 
dot->four-arrows transformation happens, a move is triggered and 
you have the glued windows.  The notion of "just at the same time" 
change with load ... 

Good luck, you bug-busters! :-)
Bye,
	Romano.

------------------------------------------------------------------
Dr. Romano Giannetti     Dip. di Ingegneria dell'Informazione 
Researcher               Elettronica Informatica Telecomunicazioni
[email-masked]      University of Pisa
------------------------------------------------------------------

---

From: Martin Kraemer <[email-masked]>
Date: Fri, 19 Apr 1996 15:09:14 +0200 (MET DST)

Romano Giannetti wrote,...
> you have the glued windows.  The notion of "just at the same time" 

There was a patch from Robert Nation (the original fvwm author) for fvwm-2.0.40
which was sent to this list in a "verbal" (i,e, not machine readable) form.
I implemented the algorithm he suggested and kept it in my RCS history.

Well, I _do_ have a slower machine here which occasionally suffers heavy
load, so I this bug gave me a lot of trouble...

This patch cured the symptom for me, though it might not be the final
word on the topic (the detect-doubleclick-by-delay technique isn't the
best of all).

As far as I can tell, this patch should apply to 2.0.42 as well (I
thought is was incorporated anyway), so here it goes (NOTE: this was for
2.0.40, and I didn't test it for 2.0.42 yet!):
===================================================================
RCS file: RCS/complex.c,v
retrieving revision 2.0.40.1
retrieving revision 2.0.40.3
diff -b -u -r2.0.40.1 -r2.0.40.3
--- 2.0.40.1	1996/01/03 21:24:08
+++ 2.0.40.3	1996/01/04 16:11:33
@@ -38,17 +38,15 @@
 
   while((total < Scr.ClickTime)&&
 	(x - xcurrent < 3)&&(x - xcurrent > -3)&&
-	(y - ycurrent < 3)&&(y - ycurrent > -3))
+        (y - ycurrent < 3)&&(y - ycurrent > -3)&&
+	((lastTimestamp - t0) < Scr.ClickTime))
     {
-      sleep_a_little(10000);
-      total+=10;
+      sleep_a_little(20000);
+      total+=20;
       if(XCheckMaskEvent (dpy,EndMask, d))
 	{
 	  StashEventTime(d);
-	  if((lastTimestamp - t0) < Scr.ClickTime)
 	    return True;
-	  else
-	    return False;
 	}
       if(XCheckMaskEvent (dpy,ButtonMotionMask|PointerMotionMask, d))
 	{

    Martin
-- 
| S I E M E N S |   [email-masked]   |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request
--
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: Romano Giannetti <[email-masked]>
Date: Fri, 19 Apr 1996 15:44:35 +0200 (MET DST)

Hi Martin!

> I implemented the algorithm he suggested and kept it in my RCS history.

Yeeeeeeeees !!! It works for me (well, I tried it only half an hour, but
loading and unloading netscape 2.0 on a java page... good load).  

So, have you a patch for the other buglet :-) ? Trim it so: 

AddToMenu "Window" "Move%mini.move.xpm%" Move
+              "Resize%jresize.xpm%" Resize
+              "Close%mini.excl.xpm%" Close

Mouse 0         1       A       PopUp Window 

start xcalc (for exemple)  and choose close from the titlebutton menu. 
The application (xcalc) correctly close, but you have got a dot cursor
and you have to click (and ear the beep) before anything else.

Thanks & TIA,
		Romano

---

From: <[email-masked]> (Charles Hines)
Date: Fri, 19 Apr 1996 09:54:58 -0400

>>>>> "Martin" == Martin Kraemer <[email-masked]> writes:

Martin> Romano Giannetti wrote,...
>> procedure and could  release the  button just at the same time the
dot-> four-arrows transformation happens, a move is triggered and
>> you have the glued windows.  The notion of "just at the same time"

Martin> There was a patch from Robert Nation (the original fvwm
Martin> author) for fvwm-2.0.40 which was sent to this list in a
Martin> "verbal" (i,e, not machine readable) form.  I implemented the
Martin> algorithm he suggested and kept it in my RCS history.

Opps!  I remember when Rob suggested that, and I meant to go back and
investigate it, but it slipped my mind...

Martin> Well, I _do_ have a slower machine here which occasionally
Martin> suffers heavy load, so I this bug gave me a lot of trouble...

Martin> This patch cured the symptom for me, though it might not be the final
Martin> word on the topic (the detect-doubleclick-by-delay technique isn't the
Martin> best of all).

No, I still think that the method for determining Click, DoubleClick,
or Motion needs to be looked at and perhaps reworked.  I'll be doing
that when I get a chance.

Martin> As far as I can tell, this patch should apply to 2.0.42 as
Martin> well (I thought is was incorporated anyway), so here it goes
Martin> (NOTE: this was for 2.0.40, and I didn't test it for 2.0.42
Martin> yet!):

Well, I'll play with it and see if it makes things any better.  If it
doesn't harm anything at least, it'll be in the next beta.

Thanks,
Chuck

*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

IBM Internal email:                        "Go back to sleep, Chuck.  You're
  [email-masked],              just havin' a nightmare--of course,
  HINESC at FISHKILL, HINESC at FSHVMFK1    we are still in Hell." Gary Larson
*******************************************************************************
--
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: Romano Giannetti <[email-masked]>
Date: Fri, 19 Apr 1996 15:55:28 +0200 (MET DST)

> and you have to click (and ear the beep) before anything else. 

the bug shows up only if there is the root window under the mouse 
pointer when the application window and the menu disappears. If there
is an xterm or another window all works ok.

Can this mean something to anyone?

Bye,
	Romano.