Subject: button handling problem

From: Dominik Vogt <[email-masked]>
Date: Fri, 3 Dec 1999 13:16:16 +0100

Bob mentioned a problem that application double clicks don't work.
I know why this happens, but I can't figure out how to prevent it.
It's a very tricky problem with button grabs:

At the moment, the Parent window of the client window has established
a passive grab on all three buttons.  Now, when I press a button over
the client window, the parent grabs the button and fvwm gets the
event.  But at the same time a 'LeaveNotify' followed by an
'EnterNotify' event is sent to the client windows and thus to the
application that created it.  This Leave/Enter prevents the double
click detection.  I'm not sure how to prevent this.  Would it help
if fvwm selects ButtonPress on the client window?

What I want to do in the end is:

 - Grab all buttons on the parent window permanently.
 - If a button is pressed over the client, check if fvwm can use
   it.  If not it is passed to the client.  Otherwise the button
   press may or may not be passed to the client, depending on what
   fvwm actually did.  

I can't figure out how to do this.  The description of the
XAllowEvents() function in my Xlib manual is very foggy.  Can
someone explain the exact meaning of 'SyncPointer', 'AsyncPointer'
and 'ReplayPointer' in conjunction with '(A)Sync...' passed to
one of the XGrab... calls?

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [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: Brad Giaccio <[email-masked]>
Date: Thu, 9 Dec 1999 07:23:51 -0500

> one of the XGrab... calls?

Dominik,
This is a little late probablly but for future reference here they are.

AsyncPointer - Specifies that pointer event processing resumes normally
if the pointer is frozen by the client when XAllowEvents is called with
AsyncPointer.

SyncPointer - Specifies that pointer event processing resumes normally,
until the next ButtonPress or ButtonRelease event, if the pointer is
frozen by the client when XAllowEvents is called with SyncPointer.

ReplayPointer - Specifies the conditions under which queued events are
released: ReplayPointer has an effect only if the pointer is grabbed by
the client and thereby frozen as the result of an event

-- 
--- 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://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: Thu, 16 Dec 1999 01:10:48 +0100

> the client and thereby frozen as the result of an event

Does this mean that (A)SyncPointer throws away the event that caused
the grab while ReplayPointer releases this event so that it can be
processed normally?  Perhaps I'm being dumb, but I don't understand
'pointer event processing resumes normally'.  I have read this in
three different places (X man pages, Xlib manual, your mail), but
I can't make sense of it.  How does this affect events that have
already been caught by the grab and processed by the grabbing client?

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: Brad Giaccio <[email-masked]>
Date: Thu, 16 Dec 1999 07:46:25 -0500

> already been caught by the grab and processed by the grabbing client?

I love text that makes less sense every time your read it.  When I
mailed this to you it made perfect snese and now I'm getting confused.
However, your summary sounds about right.