WM suport for grab key scrolling

Matthew Allum mallum at openedhand.com
Thu Apr 19 20:15:25 EDT 2007


Hi;

On Thu, 2007-04-19 at 14:31 +0200, Marco Pesenti Gritti wrote:
> Hi Matthew,
> 
> we have a grab key on the OLPC keyboard. When it's pressed we should
> grab the pointer and mouse movements should cause the main view on the
> currently active window to scroll (the web page for a browser, the
> document for a word processor etc).
> 
> Zephaniah was suggesting the WM should manage this which sounds like a
> sensible approach to me. Basically when pressing the grab key the WM
> would:
> 
> 1 Grab the pointer, hide it and ensure it's always at the center of the
> screen (otherwise when you get on the edges you would not be able to
> scroll in that direction anymore)
> 2 Ask the active window to scroll of a certain amount of pixels on x,y
> axis.
> 
> What do you think? Is there a clean way for the WM to communicate 2 to
> the active window?
> 
 
So for 1. we can warp the point and it should be pretty strait forward.
For 2. I assume this needs some application co-operation ? the easiest
way to do this is for mb to send a custom X message to the root window
for the current active application to intercept via an X event. Does it
also need to contain x,y vals and if so where do they come from ?

I can patch this functionality into mb itself or we it could be
contained in a standalone small binary which is bound to a key via the
mb key shortcut handling. Let me know what suits you best.

Im at ELC atm and probably wont get a chance to look closely at this
until Im back in the UK (this weekend).

btw, is there any chance I can get a B2 machine ? I dont have one as
yet.

Many thanks;

  -- Matthew




More information about the Devel mailing list