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