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
173 - input device discovery, hotplug
175 - Advertise axes as part of the discovery, use something like
176 "org.wayland.input.x" to identify the axes.
178 - keyboard state, layout events at connect time and when it
179 changes, keyboard leds
185 - synaptics, 3-button emulation, scim
187 - auth; We need to generate a random socket name and advertise that
188 on dbus along with a connection cookie. Something like a method
189 that returns the socket name and a connection cookie. The
190 connection cookie is just another random string that the client
191 must pass to the wayland server to become authenticated. The
192 Wayland server generates the cookie on demand when the dbus method
193 is called and expires it after 5s or so.
195 - or just pass the fd over dbus
197 - drm bo access control, authentication, flink_to
199 - Range protocol may not be sufficient... if a server cycles through
200 2^32 object IDs we don't have a way to handle wrapping. And since
201 we hand out a range of 256 IDs to each new clients, we're just
202 talking about 2^24 clients. That's 31 years with a new client
203 every minute... Maybe just use bigger ranges, then it's feasible
204 to track and garbage collect them when a client dies.
206 - Add protocol to let applications specify the effective/logical
207 surface rectangle, that is, the edge of the window, ignoring drop
208 shadows and other padding. The compositor needs this for snapping
209 and constraining window motion. Also, maybe communicate the opaque
210 region of the window (or just a conservative, simple estimate), to
211 let the compositor reduce overdraw.
213 - multi gpu, needs queue and seqno to wait on in requests
219 - draw window decorations in gtkwindow.c
221 - Details about pointer grabs. wayland doesn't have active grabs,
222 menus will behave subtly different. Under X, clicking a menu
223 open grabs the pointer and clicking outside the window pops down
224 the menu and swallows the click. without active grabs we can't
225 swallow the click. I'm sure there much more...
227 - Port Qt? There's already talk about this on the list.
231 - move most of the code from xf86-video-intel into a Xorg wayland
234 - don't ask KMS for available output and modes, use the info from
235 the wayland server. then stop mooching off of drmmode.c.
237 - map multiple wayland input devices to MPX in Xorg.
239 - rootless; avoid allocating and setting the front buffer, draw
240 window decorations in the X server (!), how to map input?
242 - gnome-shell as a wayland session compositor
244 - runs as a client of the wayland session compositor, uses
245 clutter+egl on wayland
247 - talks to an Xorg server as the compositing and window manager
248 for that server and renders the output to a wayland surface.
249 the Xorg server should be modified to take input from the system
250 compositor through gnome-shell, but not allocate a front buffer.
252 - make gnome-shell itself a nested wayland server and allow native
253 wayland clients to connect and can native wayland windows with
254 the windows from the X server.
256 - qemu as a wayland client; session surface as X case
258 - qemu has too simple acceleration, so a Wayland backend like the
259 SDL/VNC ones it has now is trivial.
261 - paravirt: forward wayland screen info as mmio, expose gem ioctls as mmio
263 - mapping vmem is tricky, should try to only use ioctl (pwrite+pread)
265 - not useful for Windows without a windows paravirt driver.
267 - two approaches: 1) do a toplevel qemu window, or 2) expose a
268 wayland server in the guest that forwards to the host wayland
269 server, ie a "remote" compositor, but with the gem buffers
270 shared. could do a wl_connection directly on mmio memory, with
271 head and tail pointers. use an alloc_head register to indicate
272 desired data to write, if it overwrites tail, block guest. just
273 a socket would be easier.
275 - moblin as a wayland compositor
277 - clutter as a wayland compositors