X application ignoring the keyboard and mouse
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Tue Aug 29 16:09:21 PDT 2006
On Tue, 29 Aug 2006 18:14:24 +0000 Remus <remus.c at plutohome.com> babbled:
> Hello everyone,
>
> I have an application which captures both the keyboard and the mouse.
> All the time, this application is on top of any other X app.
>
> Usually, this application is translucent, allowing the user to see through it.
>
> At some point in time, this application should be "translucent" to keyboard,
> and mouse events, too. So, if xcalc is behind it, any keyboard/mouse events
> need to be intercepted by xcalc, as if my app does not exist at all.
>
> Now, for the keyboard, the problem can be solved somehow, by setting xcalc to
> be the focused window. But for the mouse, I did not found a good solution.
>
> One solution would be to use XTestFakeKeyEvent & XTestFakeButtonEvent calls.
> But if instead xcalc I have a drawing app, for example, which uses drags, Ctrl
> +Mouse, and so on, this turns to be too complicated.
>
> Using the shape extension is not a good solution, because the masked area
> will be completely translucent.
>
> Any ideas, or directions to point to?
since you seem to be relying on a composite manager - you may as well use the
newer shape extension features that let you set the event shape (the ShapeInput
shape). it works like all the other bits of the shape extensions BUT explicitly
sets the region (with rectangle lists or a 1bit pixmap mask) at the api level -
internally its all rect lists anyway) where events will be valid for your
window - just make it empty and presto :)
> Thank you for any response,
>
> Best regards,
> Remus
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)
More information about the xorg
mailing list