LWN.net Logo

Yet another Wayland thread

Yet another Wayland thread

Posted Mar 12, 2013 22:23 UTC (Tue) by Serge (guest, #84957)
In reply to: Yet another Wayland thread by micka
Parent article: Canonical reveals plans to launch Mir display server (The H)

> Which is already how it works on X. Someone launches a discussion on a new net_wm hint, sometimes after some time, most implementors (ie wm maintainers) agree, and they add it (or the other way, someone implements it, asks if it could be more general etc.).

There're two differences. First: that's already done for X, standards are already created, well know and implemented, but for Wayland you have to spend 10 more years to do that again because it implements everything differently. Second: on X you don't have to patch X server to add the support for your new hint, wayland protocol is not so flexible. Can you imagine patching and rebuilding Xorg every time you want to test some new WM property? That's what you get with Wayland.


(Log in to post comments)

Yet another Wayland thread

Posted Mar 12, 2013 22:53 UTC (Tue) by micka (subscriber, #38720) [Link]

I'm not familiar with the actual apis under the window hints, so I'll tell how I imagine it and I can be corrected :

The client sets a property (a hint) and the window manager, if it knows it, interprets it.

When you decide to use a new hint, you change the window manager to interpret it and then use it in the client. So you must recompile the WM.
X provides the communication transport.

In wayland world, all this happens between the client and the compositor. If you must add a hint, you change and recompile the compositor.
There is no transport in the middle (X role above).

In both cases, the work to add a new hint is exactly the same.

Where was I wrong ?

Yet another Wayland thread

Posted Mar 15, 2013 8:27 UTC (Fri) by Serge (guest, #84957) [Link]

> When you decide to use a new hint, you change the window manager to interpret it and then use it in the client. So you must recompile the WM. X provides the communication transport.

You CAN recompile WM, but you don't have to. Your program and WM are independent. You can build your program on another WM and it will work there, just your hint will be ignored.

> In wayland world, all this happens between the client and the compositor. If you must add a hint, you change and recompile the compositor.

In Weston/Wayland you MUST recompile the compositor. Your program links with compositor, they share protocol. People won't be able build it until they update the compositor too.

> In both cases, the work to add a new hint is exactly the same.

You forget about the first difference. For the last 20 years most hints were already added, standards for them were already written and implemented in WMs. But in Wayland world you have to spend those 20 years again to reimplement them all from scratch. And you cannot reuse those standards, because Wayland does everything differently.

So in wayland world in addition to the work of adding a new hint you have to also do a lot of work to add all the old hints. It's a weird world...

Yet another Wayland thread

Posted Mar 15, 2013 9:37 UTC (Fri) by micka (subscriber, #38720) [Link]

> But in Wayland world you have to spend those 20 years again to reimplement them all from scratch.

For my part, I will assume that wayland devs are intelligent beings that are even able to make use of all the hard word that's been done in the past.

Yet another Wayland thread

Posted Mar 15, 2013 16:09 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

> In Weston/Wayland you MUST recompile the compositor. Your program links with compositor, they share protocol. People won't be able build it until they update the compositor too.
Weston/Wayland? What is it?

Wayland and Weston are completely separate and independent components.

Yet another Wayland thread

Posted Mar 13, 2013 1:43 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

Stop lying and misleading people. Wayland can be used to transport private messages (i.e. new hints) just fine without any recompilations.

Yet another Wayland thread

Posted Mar 14, 2013 6:02 UTC (Thu) by Serge (guest, #84957) [Link]

> Wayland can be used to transport private messages (i.e. new hints) just fine without any recompilations.

I'm not sure what you're trying to say, but Wayland is a protocol. It cannot transport private messages and you cannot compile it.

Yet another Wayland thread

Posted Mar 14, 2013 17:33 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Actually, Wayland is also the name of the implementation.

And I was answering to this:
>Second: on X you don't have to patch X server to add the support for your new hint, wayland protocol is not so flexible.

You CAN use Wayland protocol to pass private messages just fine. No recompilation required.

Yet another Wayland thread

Posted Mar 15, 2013 7:17 UTC (Fri) by Serge (guest, #84957) [Link]

> Actually, Wayland is also the name of the implementation.

Then what're Weston and QTWayland?

> You CAN use Wayland protocol to pass private messages just fine. No recompilation required.

I still don't understand what you mean. Protocol is a document, messages that are not in scope of that document are not part of the protocol. So you cannot send your private messages unless your "private messages" are part of the protocol. Technically you can send them through the same socket, but it won't make them part of Wayland protocol.

It's like saying that you can use GIF to store MP3 data just because you can put mp3-file to the directory with gif-files.

Yet another Wayland thread

Posted Mar 15, 2013 7:44 UTC (Fri) by micka (subscriber, #38720) [Link]

> It's like saying [...]

More like saying you can use TCP to send HTTP request.

Yet another Wayland thread

Posted Mar 15, 2013 9:09 UTC (Fri) by Serge (guest, #84957) [Link]

> More like saying you can use TCP to send HTTP request.

TCP has "data" section that is designed to carry another protocol. But you won't find a placeholder for another protocol in wayland.xml.

Yet another Wayland thread

Posted Mar 15, 2013 16:08 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

> Then what're Weston and QTWayland?
Weston is a _compositor_. I.e. it's something like a WM in X world. And QTWayland is simply a name of QT integration with Wayland.

> I still don't understand what you mean.
Basically, Wayland provides a way for processes to communicate using a special form of IPC. Applications can use this IPC to exchange any type of data they want. Wayland itself also provides some services (described in wayland.xml) using this IPC.

> It's like saying that you can use GIF to store MP3 data just because you can put mp3-file to the directory with gif-files.
No. I'm saying that I can use Dropbox to synchronize not only Dropbox user manual but also GIFs and MP3.

Yet another Wayland thread

Posted Mar 16, 2013 7:46 UTC (Sat) by Serge (guest, #84957) [Link]

> Basically, Wayland provides a way for processes to communicate using a special form of IPC. Applications can use this IPC to exchange any type of data they want. Wayland itself also provides some services (described in wayland.xml) using this IPC.

Looks like you have your own understanding of the word "Wayland". Can you give me a link to the specification of THAT Wayland?

Yet another Wayland thread

Posted Mar 16, 2013 9:06 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

http://cgit.freedesktop.org/wayland/wayland/tree/doc/Wayland - enjoy...

What exactly do you not understand? That Wayland is both the name of a protocol AND its default implementation (i.e. Wayland)? Or that Wayland protocol can be used to carry app- and shell-specific data?

Yet another Wayland thread

Posted Mar 16, 2013 14:33 UTC (Sat) by cortana (subscriber, #24596) [Link]

I don't mean to sound thick, but I thought the reference implementation was called Weston?

Yet another Wayland thread

Posted Mar 16, 2013 20:24 UTC (Sat) by HelloWorld (guest, #56129) [Link]

Wayland is both a protocol and a library implementing that protocol. Weston is a compositor based on the Wayland library.

Yet another Wayland thread

Posted Mar 17, 2013 9:45 UTC (Sun) by Serge (guest, #84957) [Link]

> http://cgit.freedesktop.org/wayland/wayland/tree/doc/Wayland - enjoy... What exactly do you not understand?

"Wayland is a protocol for a new display server", "The wayland protocol is an asynchronous object oriented protocol", "The interfaces, requests and events are defined in protocol/wayland.xml". I don't see anything about "IPC" or applications that "can use this IPC to exchange any type of data".

> That Wayland is both the name of a protocol AND its default implementation (i.e. Wayland)? Or that Wayland protocol can be used to carry app- and shell-specific data?

The link you posted states that Wayland is a protocol and Weston is implementation. Have you read it yourself? ;-)

Yet another Wayland thread

Posted Mar 17, 2013 10:04 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

> "Wayland is a protocol for a new display server", "The wayland protocol is an asynchronous object oriented protocol", "The interfaces, requests and events are defined in protocol/wayland.xml".
This makes it an IPC, by definition.

> I don't see anything about "IPC" or applications that "can use this IPC to exchange any type of data".
Check the source code. There are no restrictions on message content.

Yet another Wayland thread

Posted Mar 17, 2013 11:11 UTC (Sun) by Serge (guest, #84957) [Link]

> This makes it an IPC, by definition.

Hm. But it allows you to communicate with compositor only, and using protocol/wayland.xml messages only. Among others you also have a weird definition for "IPC"...

> Check the source code. There are no restrictions on message content.

protocol/wayland.xml is the source code of the protocol.

> Weston is a reference implementation of the Wayland compositor. Which is a separate piece from Wayland protocol or library. What do you not understand?

Ah! So what you called "Wayland" was libwayland-client (or was it libwayland-server?) I wonder, when you said "X" were you talking about libX11?

Anyway, I understand you now. Yes, libwayland allows you to send messages that are not part of the Wayland protocol, and you don't have to rebuild libwayland to send custom messages.

But that does not change much. In X world if you want your app displayed in some special way in your dockbar you need to patch you app and your dockbar, but you don't have to patch WM or X-server. In Wayland world you need to patch your app, dockbar and compositor. And it will work on your compositor only.

Yet another Wayland thread

Posted Mar 17, 2013 10:05 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

> The link you posted states that Wayland is a protocol and Weston is implementation. Have you read it yourself? ;-)
Weston is a reference implementation of the Wayland compositor. Which is a separate piece from Wayland protocol or library. What do you not understand?

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds