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