Subject: Re: FvwmIdent problem

From: Michael Han <[email-masked]>
Date: Sat, 22 Apr 2000 20:08:12 -0700

Previously from Mikhael Goikhman
>On 22 Apr 2000 17:06:34 -0700, Michael Han wrote:
>> Can we patch this?
>
>Why not, if this fixes some problem. Just make a patch and test it.
>Submit it or tell me you want write permissions, I will be for.

Well, I've written a patch and attached it. I tested it against
FvwmIdent and I believe that between this patch and Mikhael's,
FvwmIdent's behavior at start time is correct now.
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
"I will not be a snickerpuss." - Lisa

--- libs/Target.c       1999/11/04 14:10:08     1.2
+++ libs/Target.c       2000/04/23 03:01:30
@@ -144,12 +144,14 @@
   Bool finished = False;
   Bool canceled = False;
   Window Root = RootWindow(dpy, screen);
+  int is_key_pressed = 0, is_button_pressed = 0;
+  KeySym keysym;
 
   trials = 0;
   while((trials <100)&&(val != GrabSuccess))
     {
       val=XGrabPointer(dpy, Root, True,
-                      ButtonReleaseMask,
+                      ButtonPressMask | ButtonReleaseMask,
                       GrabModeAsync, GrabModeAsync, Root,
                       XCreateFontCursor(dpy,XC_crosshair),
                       CurrentTime);
@@ -168,10 +170,16 @@
 
   while (!finished && !canceled)
   {
-    XMaskEvent(dpy, ButtonReleaseMask | KeyReleaseMask, &eventp);
-    if(eventp.type == KeyRelease)
+    XMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask |
+                   KeyPressMask | KeyReleaseMask, &eventp);
+    switch (eventp.type)
     {
-      KeySym keysym = XLookupKeysym(&eventp.xkey,0);
+    case KeyPress:
+      is_key_pressed++;
+      break;
+    case KeyRelease:
+      keysym = XLookupKeysym(&eventp.xkey,0);
+      if( !is_key_pressed ) break;
       switch (keysym)
       {
       case XK_Escape:
@@ -186,10 +194,13 @@
         fvwmlib_keyboard_shortcuts(dpy, screen, &eventp, 0, 0, 0);
         break;
       }
-    }
-    else
-    {
-      finished = True;
+      break;
+    case ButtonPress:
+      is_button_pressed++;
+      break;
+    case ButtonRelease:
+      if( is_button_pressed ) finished = True;
+      break;
     }
   }

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 23 Apr 2000 11:16:18 +0300

> >Submit it or tell me you want write permissions, I will be for.

Anyone to back-up me to give write permissions to Michael Han,
giving his long contributing?

Regards,
Mikhael.
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Sun, 23 Apr 2000 18:39:13 -0400

> giving his long contributing?

Yes.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 23 Apr 2000 19:06:59 +0200

> giving his long contributing?

I asked him if he wanted write access over a year ago :-)
(he declined).  In the meantime I'll apply the patch.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Michael Han <[email-masked]>
Date: Mon, 24 Apr 2000 14:45:57 -0700

Previously from Dominik Vogt
>(he declined).  In the meantime I'll apply the patch.

So is that enough votes? It looks like maybe I might want to be able
to commit. At least for silly things like manpage fixes.
-- 
[email-masked]                         http://www.best.com/~mikehan/
coffee achiever                              San Francisco, California
"'Why is that toy on your head?' 'Because if I wear it anywhere else, it
chafes.'" - Chris Knight
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Mon, 24 Apr 2000 17:56:28 -0400

> to commit. At least for silly things like manpage fixes.

You have three, thats plenty.

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 25 Apr 2000 00:57:38 +0300

> to commit. At least for silly things like manpage fixes.

You know what you should send to Jason, right? :) It is in cvs.html, BTW.

Regards,
Mikhael.