Input issues with CompositeOverlayWindow
Rémi Cardona
remi at gentoo.org
Fri Nov 23 06:44:15 PST 2007
Kalle Vahlman a écrit :
> 2007/11/22, Rémi Cardona <remi at gentoo.org>:
>> I'm trying to use the CompositeOverlayWindow to render stuff but I can't
>> get any input from it. All the clicks and keyboard events go right
>> through the overlay directly to the underlying windows. The same code
>> behaves as expected if I use XCreateSimpleWindow.
>
> FWIW, I had the exact opposite experience just now. I didn't realize
> that the overlay is getting the input and was baffled why clicking on
> anything didn't work... For me, the fix was:
>
> XShapeCombineShape(my->display,
> my->composite_overlay, ShapeInput, 0, 0,
> my->composite_overlay, ShapeInput, ShapeInvert);
>
> Maybe you could try that to determine if it is a bug in the server or
> just that some client code empties the input shape?
Here's what I used to fix the mouse input :
XRectangle rect = { 0, 0, DisplayWidth (dpy, 0), DisplayHeight (dpy, 0) };
XShapeCombineRectangles(dpy, overlay, ShapeInput, 0, 0, &rect, 1,
ShapeUnion, Unsorted);
I'm sure there must be a better way to do that, but that works.
And that fixed the key press input :
XSetInputFocus (dpy, overlay, RevertToNone, CurrentTime);
> I'm using xephyr from a 1.1.1 server sources (apparently, debian etch
> package) for testing.
FWIW, I develop on a live xorg-server 1.4 (gentoo x86 unstable).
Kalle, thanks a lot for your tip, I was starting to lose faith :)
Cheers,
Rémi
More information about the xorg
mailing list