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