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
9 - The message format has to include information about number of fds
10 in the message so we can skip a message correctly. Or we should
11 just give up on trying to recover from unknown messages. We need
12 to make sure you never get a message from an interface you don't
13 know about (using per-client id space and subscribe) or include
14 information on number of fds, so marshalling logic can skip.
16 - generate pointer_focus (and drag focus) on raise/lower, move
17 windows, all kinds of changes in surface stacking.
21 buffer = drm.create_buffer(); /* buffer with stuff in it */
23 cache.upload(buffer, x, y, width, height, int hash)
25 drm.buffer: id, name, stride etc /* event to announce cache buffer */
27 cache.image: hash, buffer, x, y, stride /* event to announce
28 * location in cache */
30 cache.reject: hash /* no upload for you! */
32 cache.retire: buffer /* cache has stopped using buffer, please
33 * reupload whatever you had in that buffer */
38 Root window must send NULL type (to decline drop) or
39 x-wayland/root-something type if the source offers that. But the
40 target deletes the drag_offer object when drag.pointer_focus leaves
43 How do we animate the drag icon back to the drag origin in case of
46 How to handle surfaces from clients that don't know about dnd or
47 don't care? Maybe the dnd object should have a
48 dnd.register_surface() method so clients can opt-in the surfaces
49 that will participate in dnd. Or just assume client is not
50 participating until we receive an accept request.
52 - Selection/copy+paste
54 - Similar to dnd, create a selection object for a device to offer
57 selection = shell.create(input_device)
60 - selection.offer(type)
61 - selection.activate(time)
65 - selection.finish(type, fd)
66 - selection.discard() /* somebody else took the selection */
68 - Notes: no window owner, which seems to be mostly there as a way
69 to identify the client and to allow None (instead of a release
70 request). Possibly also to make the selection go away
71 automatically when the window with the contents go away, or
72 possibly as a way for the source to distinguish between multiple
73 selections. Toolkits generally just create a dummy-toplevel for
76 - Per-device selection. The selection is per device. Different
77 keyboards copy and paste to different selections.
79 - Selection offer object. Introduced just before a surface
80 receives keyboard_focus event or when somebody claims the
81 selection and on keyboard_focus? That way only keyboard_focus
82 owner will know the types... limits pasting to the
83 keyboard_focus surface.
86 - selection_offer.receive(type, fd)
89 - selection_offer.offer(type)
90 - selection_offer.keyboard_focus()
92 - Pointer image issue:
94 - A touch input device doesn't have a pointer; indicate that
97 - Cursor themes, tie in with glyph/image cache.
99 - copy-n-paste, store data in server (only one mime-type available)
100 or do X style (content mime-type negotiation, but data goes away
103 - Discard buffer, as in "wayland discarded your buffer, it's no
104 longer visible, you can stop updating it now.", reattach, as in "oh
105 hey, I'm about to show your buffer that I threw away, what was it
106 again?". for wayland system compositor vt switcing, for example,
107 to be able to throw away the surfaces in the session we're
108 switching away from. for minimized windows that we don't want live
109 thumb nails for. etc.
111 - Initial placement of surfaces. Guess we can do, 1)
112 surface-relative (menus), 2) pointer-relative (tooltips and
113 right-click menus) or 3) server-decides (all other top-levels).
115 - Per client id space. Each client has an entire 32 bit id namespace
116 to itself. On the server side, each struct wl_client has an object
117 hash table. Object announcements use a server id space and clients
118 must respond with subscribe request with a client id for the
119 object. Part of wl_proxy_create_for_id():
121 wl_display_subscribe(display, id, new_id, my_version);
125 wl_display_bind(display, id, new_id, my_version);
129 - Maps the global object into the client id space, lets client
130 allocate the id. All ids are allocated by the client this way,
131 which fixes the range protocol problem.
133 - Tells the server that the client is interested in events from
134 the object. Lets the server know that a client participates in a
135 certain protocol (like drag and drop), so the server can account
136 for whether or not the client is expected to reply
138 - Server emits initial object state event(s) in reponse to
139 receiving the subscribe request. Introduces an extra round trip
140 at initialization time, but the server will still announces all
141 objects in one burst and the client can subscribe in a burst as
144 - Separates client resources, since each client will have it's own
145 hash table. It's not longer possible to guess the id of another
146 surface and access it.
148 - Server must track the client id for each client an object is
149 exposed to. In some cases we know this (a surface is always
150 only owned by one client), in other cases it provides a way to
151 track who's interested in the object events. For input device
152 events, we can look up the client name when it receives pointer
153 focus or keyboard focus and cache it in the device.
155 - Server must know which id to send when passing object references
156 in events. We could say that any object we're passing to a
157 client must have a server id, and each client has a server id ->
160 - When a surface is the size of the screen and on top, we can set the
161 scanout buffer to that surface directly. Like compiz unredirect
162 top-level window feature. Except it won't have any protocol state
163 side-effects and the client that owns the surface won't know. We
164 lose control of updates. Should work well for X server root window
165 under wayland. Should be possible for yuv overlays as well.
167 - what about cursors then? maybe use hw cursors if the cursor
168 satisfies hw limitations (64x64, only one cursor), switch to
169 composited cursors if not.
171 - clients needs to allocate the surface to be suitable for
172 scanout, which they can do whenever they go fullscreen.
174 - multihead, screen geometry and crtc layout protocol, hotplug, lcd
177 - a wayland settings protocol to tell clients about themes (icons,
178 cursors, widget themes), fonts details (family, hinting
179 preferences) etc. Just send all settings at connect time, send
180 updates when a setting change. Getting a little close to gconf
181 here, but could be pretty simple:
183 interface "settings":
184 event int_value(string name, int value)
185 event string_value(string name, string value)
187 but maybe it's better to just require that clients get that from
188 somewhere else (gconf/dbus).
190 - input device discovery, hotplug
192 - Advertise axes as part of the discovery, use something like
193 "org.wayland.input.x" to identify the axes.
195 - keyboard state, layout events at connect time and when it
196 changes, keyboard leds
202 - synaptics, 3-button emulation, scim
204 - drm bo access control, authentication, flink_to
206 - Range protocol may not be sufficient... if a server cycles through
207 2^32 object IDs we don't have a way to handle wrapping. And since
208 we hand out a range of 256 IDs to each new clients, we're just
209 talking about 2^24 clients. That's 31 years with a new client
210 every minute... Maybe just use bigger ranges, then it's feasible
211 to track and garbage collect them when a client dies.
213 - Add protocol to let applications specify the effective/logical
214 surface rectangle, that is, the edge of the window, ignoring drop
215 shadows and other padding. The compositor needs this for snapping
216 and constraining window motion. Also, maybe communicate the opaque
217 region of the window (or just a conservative, simple estimate), to
218 let the compositor reduce overdraw.
220 - multi gpu, needs queue and seqno to wait on in requests
226 - draw window decorations in gtkwindow.c
228 - Details about pointer grabs. wayland doesn't have active grabs,
229 menus will behave subtly different. Under X, clicking a menu
230 open grabs the pointer and clicking outside the window pops down
231 the menu and swallows the click. without active grabs we can't
232 swallow the click. I'm sure there much more...
234 - Port Qt? There's already talk about this on the list.
238 - move most of the code from xf86-video-intel into a Xorg wayland
241 - don't ask KMS for available output and modes, use the info from
242 the wayland server. then stop mooching off of drmmode.c.
244 - map multiple wayland input devices to MPX in Xorg.
246 - rootless; avoid allocating and setting the front buffer, draw
247 window decorations in the X server (!), how to map input?
249 - gnome-shell as a wayland session compositor
251 - runs as a client of the wayland session compositor, uses
252 clutter+egl on wayland
254 - talks to an Xorg server as the compositing and window manager
255 for that server and renders the output to a wayland surface.
256 the Xorg server should be modified to take input from the system
257 compositor through gnome-shell, but not allocate a front buffer.
259 - make gnome-shell itself a nested wayland server and allow native
260 wayland clients to connect and can native wayland windows with
261 the windows from the X server.
263 - qemu as a wayland client; session surface as X case
265 - qemu has too simple acceleration, so a Wayland backend like the
266 SDL/VNC ones it has now is trivial.
268 - paravirt: forward wayland screen info as mmio, expose gem ioctls as mmio
270 - mapping vmem is tricky, should try to only use ioctl (pwrite+pread)
272 - not useful for Windows without a windows paravirt driver.
274 - two approaches: 1) do a toplevel qemu window, or 2) expose a
275 wayland server in the guest that forwards to the host wayland
276 server, ie a "remote" compositor, but with the gem buffers
277 shared. could do a wl_connection directly on mmio memory, with
278 head and tail pointers. use an alloc_head register to indicate
279 desired data to write, if it overwrites tail, block guest. just
280 a socket would be easier.
282 - moblin as a wayland compositor
284 - clutter as a wayland compositors