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