Screen dimensions, top level surface positioning...

Jari Vuomajoki rakkaudentuli at
Fri Nov 24 16:40:13 UTC 2017

Hi Everyone!

Thank you all for clear answers. I can understand the problematic of
providing parallel solutions for several graphics environments... here is the use-case I am puzzled with:

I am implementing a desktop application consisting of several windows. I
can create proper implementation using the existing client API. However
there is one scenario that falls out of the possibilities.

Let's say that the environment is a desktop computer with single screen.
The workflow consists using several applications with some applications
having several top-level windows and jumping between them using shortcuts,
jumping between applications as well as application windows. Composers
usually have uniform solution jumping between applications and application
windows that can be associated with shortcuts, expose-style layout
solutions, other gestures...

At this point everything works well with current Wayland client API. But if
a client wants to organize it's top-level windows in more suitable ways
like organizing windows side by side, creating a grid or organizing them in
a special purpose custom layout... it is no longer possible with top level
windows. This is only possible for sub-surfaces, therefore breaking the
integration with the shortcuts and exposure with the composer/WM.

I think this kind of scenario is relatively common: One screen, multiple
applications with multiple windows.

Of course a solution is implementing composer or shell, but this breaks
compatibility across composers/WMs.


On 22 November 2017 at 09:44, Pekka Paalanen <ppaalanen at> wrote:

> On Wed, 22 Nov 2017 10:07:47 +0800
> Jonas Ã…dahl <jadahl at> wrote:
> > On Wed, Nov 22, 2017 at 03:43:43AM +0200, Jari Vuomajoki wrote:
> > > Hi Jasper,
> > >
> > > Thank you very much for your very clear and comprehensible answer. I
> > > understand the challenges you are addressing.
> > >
> > > I want to build applications that can facilitate the screen layout to
> the
> > > fullest and still collaborate with WM.
> > >
> > > I don't really get the "fight" between WM and client. Maybe it is an
> > > invitation for someone to build a really nice WM / compositor,
> satisfying
> > > all needs.
> > >
> > > However, stating it bluntly - Client side surface positioning
> relationship
> > > to screen dimensions or multiple screen topology is a must.
> >
> > It is a must for a very specific subset of specalized clients that
> > construct desktop environment components such as panels, launchers etc.
> > For regular applications, complete control of positioning is generally
> > only used to implement some functionality the compositor would be better
> > at.
> >
> > >
> > > I think it can be done without compromising the simplicity and clarity
> of
> > > the protocol. Or is there something that I am not seeing?
> >
> > I don't know what type of client it is that you are trying to implement,
> > but with the assumption made above, you'll have to look into extensions
> > allowing you to achieve the outcome you are working towards.
> >
> > However, you cannot rely on every desktop environment / compositor to
> > support every use case that was possible on X11. This is to make it
> > possible for highly integrated environments such to be implementable.
> >
> > With that said, this does not stop any compositor to add protocols
> > for "plug-n-play" kind of environments. One project which goal is to
> > provide these types of protocols is wayland-wall:
> >
> >
> > Now, you might be trying to implement something else, such as a splash
> > screen or something. That is might something that hasn't had a protocol
> > defined for it defined yet, but I would have to know what it is that you
> > are doing to be able to comment on that.
> Hi,
> I agree with everything Jasper and Jonas have said, but I would like to
> point out one more thing.
> The discussion so far has been about desktops. We do not want to expose
> a global coordinate system on desktops specifically, for all the reasons
> said.
> One detail why clients should not be able to position their floating
> windows in absolute positions is that they cannot know what other
> windows are on screen, therefore they cannot do positioning always
> right. Also consider tiling window manager environments, VR
> environments where the global space is actually 3D, not 2D, etc.
> The HiDPI support where different outputs have different scaling
> factors that the compositor automatically applies as necessary (a
> feature that has been impossible on X11 so far) makes it harder to even
> define a global coordinate system at the protocol level.
> That is on desktops. Those are also reasons why the Wayland core
> protocol does not have any kind of wl_surface positioning at all.
> But, if what you are building is not a desktop, then the situation is
> completely different. A custom non-desktop environment can and probably
> should use a custom shell protocol extension that replaces the desktop
> shell protocol extensions. Doing that, it can provide whatever you
> want. The major drawback is that you need to add explicit protocol
> support to all compositors and toolkits you want working with it.
> An example of an alternate shell protocol implementation is Weston's
> fullscreen-shell, which is tailored for a single exclusive application
> controlling all outputs. You can achieve per-output absolute
> positioning there by using sub-surfaces.
> Thanks,
> pq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list