Some questions about Wayland

Pekka Paalanen ppaalanen at
Wed Apr 11 01:45:43 PDT 2012

On Wed, 11 Apr 2012 10:31:53 +0200
Renaud Hebert <renozyx at> wrote:

> Thanks for your answer, see my reply below.
> Le 11 avril 2012 10:16, Pekka Paalanen <ppaalanen at> a écrit :
> > On Wed, 11 Apr 2012 09:51:22 +0200
> > Renaud Hebert <renozyx at> wrote:
> >
> >> Hello,
> >>
> >> In the comments on an article about "the state of Wayland" at lwn
> >> (, two interesting questions were
> >> raised:
> >> 1- would gridmgr (an application which place the windows into
> >> predefined grid layouts ) work on Wayland?
> >> 2- same question for Gromit
> >> ( an application which allow
> >> you to "draw" on your screen.
> >>
> >> For (1), I think that this would require an extension specific to the
> >> compositor used (Weston, KDE's planned compositor, etc).
> >
> > Yes, because that is a window manager's job and requires knowledge of
> > all windows on screen. Most likely it would be implemented in the
> > server and only controlled by a special client.
> >
> > In X any application can walk over your window manager and fight with
> > it, in Wayland such is not possible and clients cannot know about other
> > clients' windows, and not even about absolute window positions.
> >
> >> For (2), I don't know: I think that this would require some form of
> >> input redirection (there would be a fullscreen transparent windows but
> >> when not in drawing mode it shouldn't receive the mouse events) and I
> >> don't think that Wayland has this feature?
> >
> > That's easy: Wayland surfaces have an input region, and that region can
> > be empty. Only input region receives input events, regardless of (well,
> > clipped to, really) the surface size. So you just make your maximised
> > transparent window and set the input region to empty, and all pointer
> > and touch events will bypass your window. When you want to draw, make
> > that input region non-empty. You probably need another window to click
> > at for that. ;-)
> This seems to work nicely for the mouse events (either set the input
> region to empty or to full screen), but what about the keyboard
> events?
> From Gromit's description, it use the 'pause' key to implement the
> modal interface..

AFAIK, we don't have arbitrary client bindable global hot keys, and I
don't know of any plans for such. It might be a bad idea, IMHO.

However, a DE, or more precisely the shell (plugin) implementation in
the server, could allow the user to bind global keys to running
commands. Such a command could then kick gromit's Wayland client to
start drawing. That should be easy enough, not expose any keyboard
hijacking features, and not require any new protocol. That's how I'd
start looking at it.


More information about the wayland-devel mailing list