Generate client side marshal stubs from protocol spec
[profile/ivi/wayland.git] / TODO
1 Core wayland protocol
2
3  - generate pointer_focus on raise/lower, move windows, all kinds of
4    changes in surface stacking.
5
6  - don't store globals on client side, require global_handler like
7    everything else.
8
9  - glyph cache
10
11  - dnd, figure out large object transfer: through wayland protocol or
12    pass an fd through the compositor to the other client and let them
13    sort it out?
14
15  - copy-n-paste, store data in server (only one mime-type available)
16    or do X style (content mime-type negotiation, but data goes away
17    when client quits).
18
19  - protocol for setting the cursor image
20
21     - should we have a mechanism to attach surface to cursor for
22       guaranteed non-laggy drag?
23
24     - drawing cursors, moving them, cursor themes, attaching surfaces
25       to cursors.  How do you change cursors when you mouse over a
26       text field if you don't have subwindows?  This is what we do: a
27       client can set a cursor for a surface and wayland will set that
28       on enter and revert to default on leave
29
30  - Discard buffer, as in "wayland discarded your buffer, it's no
31    longer visible, you can stop updating it now.", reattach, as in "oh
32    hey, I'm about to show your buffer that I threw away, what was it
33    again?".  for wayland system compositor vt switcing, for example,
34    to be able to throw away the surfaces in the session we're
35    switching away from.  for minimized windows that we don't want live
36    thumb nails for. etc.
37
38  - Consolidate drm buffer upload with a create_buffer request, returns
39    buffer object we can use in surface.attach, cache.upload and
40    input.attach?  Will increase object id usage significantly, each
41    buffer swap allocates and throws away a new id.  Does consolidate
42    the details of a buffer very nicely though.
43
44      compositor.create_buffer(new_id, visual, name, stride, width, height)
45
46      surface.attach(buffer)
47
48      cache.upload(buffer, x, y, width, height)
49
50      input.set_cursor(buffer, hotspot_x, hotspot_y)
51
52    Doesn't increase id usage too much, can keep buffers around.
53
54  - Move/resize protocol in the style of the dnd protocol: a surface
55    who has a grabbed device can send a request to initiate a
56    resize(top/bottom+rigth/left) or a move.  The compositor will then
57    resize or move the window and take into account windows, panels and
58    screen edges and constrain and snap the motion accordingly.  As the
59    cursor moves, the compositor sends resize or move (maybe not move
60    events?) events to the app, which responds by attaching a new
61    surface at the new size (optionally, reducing the allocated space
62    to satisfy aspect ratio or resize increments).
63
64  - Initial placement of surfaces.  Guess we can do, 1)
65    surface-relative (menus), 2) pointer-relative (tooltips and
66    right-click menus) or 3) server-decides (all other top-levels).
67
68  - When a surface is the size of the screen and on top, we can set the
69    scanout buffer to that surface directly.  Like compiz unredirect
70    top-level window feature.  Except it won't have any protocol state
71    side-effects and the client that owns the surface won't know.  We
72    lose control of updates.  Should work well for X server root window
73    under wayland.  Should be possible for yuv overlays as well.
74
75     - what about cursors then?  maybe use hw cursors if the cursor
76       satisfies hw limitations (64x64, only one cursor), switch to
77       composited cursors if not.
78
79     - clients needs to allocate the surface to be suitable for
80       scanout, which they can do whenever they go fullscreen.
81
82  - multihead, screen geometry and crtc layout protocol, hotplug
83
84  - input device discovery, hotplug
85
86     - Advertise axes as part of the discovery, use something like
87       "org.wayland.input.x" to identify the axes.
88
89     - keyboard state, layout events at connect time and when it
90       changes, keyboard leds
91
92     - relative events
93
94     - multi touch?
95
96     - synaptics, 3-button emulation, scim
97
98  - sparse/gcc plugin based idl compiler
99
100     - crack?
101
102     - xml based description instead?
103
104  - Figure out if we need the batch/commit scheme and what to do
105    instead.  Since dropping the "copy" request, we have a race between
106    copy from back to front and reporting damage.  "copy" did this
107    atomically, but copy is a rendering operation (wayland doesn't do
108    rendering) and requires synchronization between server and client
109    before client can reuse backbuffer.
110
111    The race condition happens when a client copies new content into
112    its window and then, before the client reports the damage, the
113    compositor then does a partial repaint (triggered by another
114    client) that only pulls in part of the repainted area.  It's only a
115    one-frame glitch, as the client will submit the damage and the
116    compositor will repaint the damaged area next frame.  And ideally
117    clients should do all rendering as early in the frame as possible
118    to avoid this race.
119
120  - auth; We need to generate a random socket name and advertise that
121    on dbus along with a connection cookie.  Something like a method
122    that returns the socket name and a connection cookie.  The
123    connection cookie is just another random string that the client
124    must pass to the wayland server to become authenticated.  The
125    Wayland server generates the cookie on demand when the dbus method
126    is called and expires it after 5s or so.
127
128     - or just pass the fd over dbus
129
130  - drm bo access control, authentication, flink_to
131
132  - Range protocol may not be sufficient... if a server cycles through
133    2^32 object IDs we don't have a way to handle wrapping.  And since
134    we hand out a range of 256 IDs to each new clients, we're just
135    talking about 2^24 clients.  That's 31 years with a new client
136    every minute...  Maybe just use bigger ranges, then it's feasible
137    to track and garbage collect them when a client dies.
138
139  - Add protocol to let applications specify the effective/logical
140    surface rectangle, that is, the edge of the window, ignoring drop
141    shadows and other padding.  The compositor needs this for snapping
142    and constraining window motion.  Also, maybe communicate the opaque
143    region of the window (or just a conservative, simple estimate), to
144    let the compositor reduce overdraw.
145
146  - multi gpu, needs queue and seqno to wait on in requests
147
148 Clients and ports
149
150  - port gtk+
151
152     - eek, so much X legacy stuff there...
153
154     - draw window decorations in gtkwindow.c
155
156     - start from alexl's client-side-windows branch
157
158     - Details about pointer grabs. wayland doesn't have active grabs,
159       menus will behave subtly different.  Under X, clicking a menu
160       open grabs the pointer and clicking outside the window pops down
161       the menu and swallows the click.  without active grabs we can't
162       swallow the click.  I'm sure there much more...
163
164  - Port Qt?  There's already talk about this on the list.
165
166  - X on Wayland
167
168     - move most of the code from xf86-video-intel into a Xorg wayland
169       module.
170
171     - don't ask KMS for available output and modes, use the info from
172       the wayland server.  then stop mooching off of drmmode.c.
173
174     - map multiple wayland input devices to MPX in Xorg.
175
176     - rootless; avoid allocating and setting the front buffer, draw
177       window decorations in the X server (!), how to map input?
178
179  - gnome-shell as a wayland session compositor
180
181     - runs as a client of the wayland session compositor, uses
182       clutter+egl on wayland
183
184     - talks to an Xorg server as the compositing and window manager
185       for that server and renders the output to a wayland surface.
186       the Xorg server should be modified to take input from the system
187       compositor through gnome-shell, but not allocate a front buffer.
188
189     - make gnome-shell itself a nested wayland server and allow native
190       wayland clients to connect and can native wayland windows with
191       the windows from the X server.
192
193  - qemu as a wayland client; session surface as X case
194
195     - qemu has too simple acceleration, so a Wayland backend like the
196       SDL/VNC ones it has now is trivial.
197
198     - paravirt: forward wayland screen info as mmio, expose gem ioctls as mmio
199
200     - mapping vmem is tricky, should try to only use ioctl (pwrite+pread)
201
202     - not useful for Windows without a windows paravirt driver.
203
204     - two approaches: 1) do a toplevel qemu window, or 2) expose a
205       wayland server in the guest that forwards to the host wayland
206       server, ie a "remote" compositor, but with the gem buffers
207       shared.  could do a wl_connection directly on mmio memory, with
208       head and tail pointers.  use an alloc_head register to indicate
209       desired data to write, if it overwrites tail, block guest.  just
210       a socket would be easier.
211
212  - moblin as a wayland compositor
213
214     - clutter as a wayland compositors
215
216     - argh, mutter