1 This file is a collection of informal notes, with references to where
2 they were originally written. Each note should have a source and date
3 mentioned. Let's keep these in date order, newest first.
7 -----------------------------------------------------------------------
8 2012-10-23; Pekka Paalanen <ppaalanen@gmail.com>
9 http://lists.freedesktop.org/archives/wayland-devel/2012-October/005969.html
11 For anyone wanting to port or write their own window manager to Wayland:
13 Most likely you have a desktop window manager. A quick way to get
14 started, is to fork Weston's desktop-shell plugin and start hacking it.
15 Qt could be another good choice, but I am not familiar with it.
17 You also need to understand some concepts. I'm repeating things I wrote
18 to the wayland-devel list earlier, a little rephrased.
20 We need to distinguish three different things here (towards Wayland
23 - compositors (servers)
24 All Wayland compositors are indistinguishable by definition,
25 since they are Wayland compositors. They only differ in the
26 global interfaces they advertise, and for general purpose
27 compositors, we should aim to support the same minimum set of
28 globals everywhere. For instance, all desktop compositors
29 should implement wl_shell. In X, this component corresponds to
30 the X server with a built-in compositing manager.
33 This is a new concept compared to an X stack. A shell defines
34 how a user and applications interact. The most familiar is a
35 desktop (environment). If KDE, Gnome, and XFCE are desktop
36 environments, they all fall under the *same* shell: the desktop
37 shell. You can have applications in windows, several visible at
38 the same time, you have keyboards and mice, etc.
40 An example of something that is not a desktop shell
41 could be a TV user interface. TV is profoundly different:
42 usually no mouse, no keyboard, but you have a remote control
43 with some buttons. Freely floating windows probably do not make
44 sense. You may have picture-in-picture, but usually not several
45 applications showing at once. Most importantly, trying to run
46 desktop applications here does not work due to the
47 incompatible application and user interface paradigms.
49 On protocol level, a shell is the public shell interface(s),
50 currently for desktop it is the wl_shell.
53 The X Window Managers correspond to different wl_shell
54 implementations, not different shells, since they pratically
55 all deal with a desktop environment. You also want all desktop
56 applications to work with all window managers, so you need to
57 implement wl_shell anyway.
59 I understand there could be special purpose X Window Managers, that
60 would better correspond to their own shells. These window managers
61 might not implement e.g. EWMH by the spec.
63 When you implement your own window manager, you want to keep the public
64 desktop shell interface (wl_shell). You can offer new public
65 interfaces, too, but keep in mind, that someone needs to make
66 applications use them.
68 In Weston, a shell implementation has two parts: a weston plugin, and a
69 special client. For desktop shell (wl_shell) these are src/shell.c and
70 clients/desktop-shell.c. The is also a private protocol extension that
71 these two can explicitly communicate with.
73 The plugin does window management, and the client does most of user
74 interaction: draw backgrounds, panels, buttons, lock screen dialog,
75 basically everything that is on screen.
77 -----------------------------------------------------------------------