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