Protocol for window previews/thumbnails

Pekka Paalanen ppaalanen at gmail.com
Fri May 20 07:50:13 UTC 2016


On Thu, 19 May 2016 18:10:19 +0100
adlo <adloconwy at gmail.com> wrote:

> > On 12 May 2016, at 08:57, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > 
> > On Wed, 11 May 2016 23:35:01 +0100
> > ade low <adloconwy at gmail.com> wrote:  
> >> My use case is third-party window switcher applications, such as
> >> xfdashboard or my program, xfce4-lightdash-plugin:
> >> https://github.com/adlocode/xfce4-lightdash-plugin  
> > 
> > The implementation of such things would have so much
> > compositor-internal parts anyway, that making a protocol for it does
> > not seem tractable to me. Why would anyone bother implementing such
> > protocol in their compositor?  
> 
> If there is no protocol, what could be an alternative way for
> third-party window switchers to be implemented on Wayland compositors?

In general, so that it would work anywhere? None; see Mike's reply.

For specific compositors you might be able to implement plugins, or
maintain a fork of the compositor project.


> >> A little more tractable plan would be to communicate only surface  
> >>> meta-data to the client,
> >>> which could then ask the compositor to draw
> >>> the thumbnails relative to one of the client's surfaces. The
> >>> client would never have access to window content itself.    
> >>   
> > The very point is, the client would not render the thumbnails at
> > all. The compositor would. Painting a copy of a window at another
> > location should be fairly easy in theory. From your client
> > perspective it would be a little like a special sub-surface whose
> > content magically just appears on screen.  
> 
> If I wanted to try writing something like this as a Weston extension
> for testing purposes, how could I get the window's surface?

You would design a new protocol extension private to Weston, with which
you deliver to your client the handles for top-level windows as they
come and go. Then with those handles you could design a protocol for
laying out a scaled version of the surface referred to by a handle on
top of a wl_surface of your own.

You cannot get "the window's surface". You need to invent a new type of
handle (a protocol object interface) for referring to windows, and
communicate any metadata you may need with it.


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


More information about the wayland-devel mailing list