Clients reading their surface position on screen

Christopher James Halse Rogers chris at
Thu Jul 24 05:52:09 UTC 2014

On Thu, Jul 24, 2014 at 12:03 PM, Daniel van Vugt 
<daniel.van.vugt at> wrote:
> While events are being injected into evdev at the kernel level, you 
> do have to know screen coordinates of the window in the least, so 
> touches match up. That makes Mir's sharing the window position 
> important.
> We could take Mir out of the equation if:
>   (a) The event injection moved up the stack; or
>   (b) All windows tested reside at (0,0).
> I'm not sure either of those are as practical as adding a single 
> function to the Mir client API. Although I know we don't want it to 
> be used in general.

What do we do for the cases where it's not possible to return a correct 
answer from that function?

Hm. On second thoughts, maybe we should include this, and our existing 
two debug symbols, in an explicit libmirclient-debug library that we 
disclaim responsibility for.

That would still make autopilot need mir-specific code, but not too 
badly. And we wouldn't need to feel bad about making the implementation 
loop over every screen pixel checking whether input at that point hits 
the requested bit. :)

More information about the Mir-devel mailing list