Idea: adding an input mask extension

Anton Markov anton at truxtar.com
Sun Dec 26 15:35:06 PST 2004


Hello everyone,

I have been thinking of a new feature/extension for the X.org project, 
and I am sending this to the mailing list to see if there is interest in 
this, or if it's a stupid idea.

As far as I understand (correct me if I am wrong), an application 
running under X11 can specify a bitmap which determines the shape of the 
window (through the shape extension). Only areas defined as part of the 
window (set to "on") will be displayed.

What if we use a similar idea, but instead of defining the area to be 
rendered, the new bitmap would define the area of the window that 
accepts input. Areas which are not set to "on" will never receive input 
(more specifically mouse events). Instead, the event will go to the 
window below it.

Here are the advantages:
- Imagine a tutorial program which uses the composite extension to 
display semi-transparent tips and instructions _over top_ of the 
application/window it is describing. It uses the input mask to specify 
that it doesn't want to receive any input, and sets itself in the 
forground. The user can continue to interact with applications 
underneath the window, as if the information window isn't there.

- Could possibly replace the shape extension all together, by allowing 
the application to create fully anti-aliased edges using the composite 
extension and simply specify that it doesn't want input beyond the 
edges. Window managers could generate their own shadows which wouldn't 
interfere with the focus or input of windows underneath them.

- Gives application authors the ability to create a variety of "ghost 
objects" which can display information (or just look cool), while moving 
around the desktop without interfering with the user's input focus.

Since the current shape extension already masks the input too, would it 
be possible to simply copy/move the input-masking code into a separate 
extension ?

As a further extension to this extension, it would be nice to give two 
applications the ability to _both_ receive the input events (share 
focus). For example, the tutorial in example 1 above would know when the 
user has opened a menu in the window below it and update the information 
it is displaying.


Since I don't know much about the internals of the X.org server, I would 
like to know if this is even possible, and if people want something like 
this. If yes, I would like to know if someone wants to help me get this 
idea started.

All comments are welcome.

-- 
Anton Markov <("anton" + "@" + "truxtar" + "." + "com")>

GnuPG Key fingerprint =
5546 A6E2 1FFB 9BB8 15C3  CE34 46B7 8D93 3AD1 44B4

*** LINUX - MAY THE SOURCE BE WITH YOU! ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20041226/e905a0cf/attachment.pgp>


More information about the xorg mailing list