Weston compositor sleep from wayland client

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 13 11:07:12 UTC 2018


On Thu, 13 Sep 2018 10:32:52 +0530
nsolanki at codeaurora.org wrote:

> On 2018-09-12 18:38, Pekka Paalanen wrote:

> > You could write a new Wayland extension, implement it in Weston and
> > your app, and control the compositor state that way. However, generally
> > it is a bad idea to let arbitrary clients freeze the compositor, but
> > you could restrict it to a specific special client.

> I am trying a similar functionality of "Sleep" as provided by Windows 
> Operating system. Clicking "Sleep" option with the help of mouse turns 
> display in sleeping state or else pressing the power button should put 
> display to sleep state.
> 
> To wake, mouse should be clicked or a power button should be pressed.
> 
> In Current weston code, I see idle-time is default to 300 seconds, after 
> 300 seconds, compositor is in WESTON_COMPOSITOR_SLEEPING state, and 
> touching the display panel wakes it up puts compositor to 
> WESTON_COMPOSITOR_ACTIVE state.
> 
> Can a "Sleep" functionality similar to Windows operating system be 
> implemented on Wayland Clients?

Yes, if you do what I wrote about "write a new Wayland extension" above.

Also, it should not be exposed to all clients. It is what one would
call "compositor UI" or "desktop environment UI". Clients providing
such UI receive special permissions from the compositor, because nobody
wants arbitrary clients to be able to mess up their desktop at will.
But, if this is aiming for a closed system where all clients are
trusted, things could be different.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180913/b1456cf8/attachment.sig>


More information about the wayland-devel mailing list