On Wed, 29 Oct 2003 21:13:33 +0100 "Gerhard W. Gruber" <[EMAIL PROTECTED]>
babbled:

> On Wed, 29 Oct 2003 08:20:00 +1100, Carsten Haitzler (The Rasterman)
> <[EMAIL PROTECTED]> wrote:
> 
> >again - see my other reply. you've found a can of worms that basically x
> >doesn't do. ou COULD do this with mouse button presses (XGrabButton) and the
> >dot he XAllowEvent thing... but not just the mouse moving in general. you'd
> >hit a
> 
> I don't need the mouse movements. I just need the buttons. I read something
> today about XAllowEvents and I had the impression that this could do what I
> wanted, but I can't put my finger on it, because I don't know enough about
> Xlib.

actually ignore my XGrabButton thing. i forgot that by trying this you'll
disable any wm being able to do click to focus :( you basically are stuck. x
can't do what you want. but just so you know, XAllowEvents is used in
combination with XGrabButton (or XGrabKey). When you passively grab a button or
key on a window, when that button or key (+ modifiers) is pressed, the client
that grabbed gets the event, not the destination window. you cna now process, do
something (ie for the wm this would be used to do click to focus - ie focus the
window if it isnt focused). then you can use XAllowEvents to have that event
"fall through" to its originally intended destination. caveta. if you read any
other events from the queue before calling x allowevent you can no longer allow
the event through (imho a real let-down in xlib). BUt again - this is not useful
to you as the wm will have grabbed on window frames to do click to focus and
thus ancestors of root will have grabs and thus your XGrabButton will fail to
actually grab anything.

> >limitation of x. you'd HAVE to extend X itself with an extension to do what
> >you are after (unless there is an extension of this i don't know of
> >somewhere. i know xtest wont do it for sure...)
> 
> Well, xtest is only a small program to test how I can achieve this. I never
> claimed it would do this and it also isn't finished. It just that, a
> testprogram so that I don't have to deal with a fullblown application and GTK
> and wxWindows also.

i meant XTest extension (you can fake events with this - with limitations).

> 
> -- 
> Gerhard Gruber
> 
> Klar, einleuchtend und falsch. (Henry Louis Mencken)
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel


-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
熊耳 - 車君                         [EMAIL PROTECTED]
Mobile Phone: +61 (0)413 451 899    Home Phone: 02 9698 8615
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to