Use new connection object in client code too.
[profile/ivi/wayland.git] / NOTES
1
2 KEYWORDS:
3
4 Wayland is a nano display server, relying on drm modesetting, gem
5 batchbuffer submission and hw initialization generally in the
6 kernel.  Wayland is compositing manager and display server in one
7 process.  window management is largely pushed to the clients, they
8 draw their own decorations and move and resize themselves,
9 typically implemented in a library.  more of the core desktop could
10 be pushed into wayland, for example, stock desktop components such
11 as the panel or the desktop background.
12
13 It is still designed with a windowed type of desktop in mind, as
14 opposed to fullscreen-all-the-time type of interface.
15
16 Current trends goes towards less and less rendering in X server, more
17 hardware setup and management in kernel and shared libraries allow
18 code sharing without putting it all in a server.  freetype,
19 fontconfig, cairo all point in this direction, as does direct
20 rendering mesa.
21
22 Client allocates DRM buffers, draws decorations, and full window
23 contents and posts entire thing to server along with dimensions.
24
25 Everything is direct rendered and composited.  No cliprects, no
26 drawing api/protocl between server and client.  No
27 pixmaps/windows/drawables, only surfaces (essentially pixmaps).  No
28 gcs/fonts, no nested windows.  OpenGL is already direct rendered,
29 pixman may be direct rendered which adds the cairo API, or cairo
30 may gain a GL backend.
31
32 Could be a "shell" for launching gdm X server, user session servers,
33 safe mode xservers, graphics text console.  From gdm, we could also
34 launch a rdp session, solid ice sessions.  
35
36 All surface commands (copy, attach, map=set quads) are buffered until
37 the client sends a commit command, which executes everything
38 atomically...
39
40
41 ISSUES:
42
43 Include panel and desktop background in wayland?
44
45 How does clients move their surfaces? set a full tri-mesh every time?
46
47 How does the server apply transformations to a surface behind the
48 clients back? (wobbly, minimize, zoom)  Maybe wobble is client side?
49
50 How do apps share the glyph cache?
51
52 Input handling - keyboard focus, multiple input devices, multiple
53 pointers, multi touch.
54
55 Drawing cursors, moving them, cursor themes, attaching surfaces to
56 cursors.  How do you change cursors when you mouse over a text
57 field if you don't have subwindows?
58
59 synaptics, 3-button emulation, xkb, scim
60
61 changing screen resolution, adding monitors.
62
63 What to do when protocol out buffer fills up?  Just block on write
64 would work I guess.  Clients are supposed to throttle using the bread
65 crumb events, so we shouldn't get into this situation.
66
67
68 RMI
69
70 The wayland protocol is a async object oriented protocol.  All
71 requests are method invocations on some object.  The request include
72 an object id that uniquely identifies an object on the server.  Each
73 object implements an interface and the requests include an opcode that
74 identifies which method in the interface to invoke.
75
76 The server sends back events to the client, each event is emitted from
77 an object.  Events can be error conditions.  The event includes the
78 object id and the event opcode, from which the client can determine
79 the type of event.  Events are generated both in repsonse to a request
80 (in which case the requet and the event constitutes a round trip) or
81 spontanously when the server state changes.
82
83 the get_interface method is called on an object to get an object
84 handle that implements the specified interface.