blob: e49052b81a151b80ace9ab0bfc4d67fab139df76 [file] [log] [blame]
Pekka Paalanen16b41e42012-10-24 09:43:10 +03001This file is a collection of informal notes, with references to where
2they were originally written. Each note should have a source and date
3mentioned. Let's keep these in date order, newest first.
4
5
6
7-----------------------------------------------------------------------
82012-10-23; Pekka Paalanen <ppaalanen@gmail.com>
9http://lists.freedesktop.org/archives/wayland-devel/2012-October/005969.html
10
11For anyone wanting to port or write their own window manager to Wayland:
12
13Most likely you have a desktop window manager. A quick way to get
14started, is to fork Weston's desktop-shell plugin and start hacking it.
15Qt could be another good choice, but I am not familiar with it.
16
17You also need to understand some concepts. I'm repeating things I wrote
18to the wayland-devel list earlier, a little rephrased.
19
20We need to distinguish three different things here (towards Wayland
21clients):
22
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.
31
32- shells
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.
39
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.
48
49 On protocol level, a shell is the public shell interface(s),
50 currently for desktop it is the wl_shell.
51
52- "window managers"
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.
58
59I understand there could be special purpose X Window Managers, that
60would better correspond to their own shells. These window managers
61might not implement e.g. EWMH by the spec.
62
63When you implement your own window manager, you want to keep the public
64desktop shell interface (wl_shell). You can offer new public
65interfaces, too, but keep in mind, that someone needs to make
66applications use them.
67
68In Weston, a shell implementation has two parts: a weston plugin, and a
69special client. For desktop shell (wl_shell) these are src/shell.c and
70clients/desktop-shell.c. The is also a private protocol extension that
71these two can explicitly communicate with.
72
73The plugin does window management, and the client does most of user
74interaction: draw backgrounds, panels, buttons, lock screen dialog,
75basically everything that is on screen.
76
77-----------------------------------------------------------------------