~ubuntu-branches/ubuntu/natty/wayland/natty

« back to all changes in this revision

Viewing changes to TODO

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2011-02-21 18:35:33 UTC
  • Revision ID: james.westby@ubuntu.com-20110221183533-4dm0eushai2b571k
Tags: upstream-0.1~git20101129.ac93a3d3
ImportĀ upstreamĀ versionĀ 0.1~git20101129.ac93a3d3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 - 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.
 
15
 
 
16
 - generate pointer_focus (and drag focus) on raise/lower, move
 
17
   windows, all kinds of changes in surface stacking.
 
18
 
 
19
 - glyph cache
 
20
 
 
21
      buffer = drm.create_buffer(); /* buffer with stuff in it */
 
22
 
 
23
      cache.upload(buffer, x, y, width, height, int hash)
 
24
 
 
25
      drm.buffer: id, name, stride etc /* event to announce cache buffer */
 
26
 
 
27
      cache.image: hash, buffer, x, y, stride /* event to announce
 
28
                                              * location in cache */
 
29
 
 
30
      cache.reject: hash   /* no upload for you! */
 
31
 
 
32
      cache.retire: buffer /* cache has stopped using buffer, please
 
33
                            * reupload whatever you had in that buffer */
 
34
 
 
35
 
 
36
 - DnD issues:
 
37
 
 
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
 
41
   the surface...
 
42
 
 
43
   How do we animate the drag icon back to the drag origin in case of
 
44
   a failed drag?
 
45
 
 
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.
 
51
 
 
52
 - Selection/copy+paste
 
53
 
 
54
    - Similar to dnd, create a selection object for a device to offer
 
55
      selection data:
 
56
 
 
57
         selection = shell.create(input_device)
 
58
 
 
59
        Requests:
 
60
         - selection.offer(type)
 
61
         - selection.activate(time)
 
62
         - selection.destroy()
 
63
 
 
64
        Events:
 
65
         - selection.finish(type, fd)
 
66
         - selection.discard() /* somebody else took the selection */
 
67
 
 
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
 
74
      selections though.
 
75
 
 
76
    - Per-device selection.  The selection is per device.  Different
 
77
      keyboards copy and paste to different selections.
 
78
 
 
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.
 
84
 
 
85
        Requests:
 
86
         - selection_offer.receive(type, fd)
 
87
 
 
88
        Events:
 
89
         - selection_offer.offer(type)
 
90
         - selection_offer.keyboard_focus()
 
91
 
 
92
 - Pointer image issue:
 
93
 
 
94
    - A touch input device doesn't have a pointer; indicate that
 
95
      somehow.
 
96
 
 
97
    - Cursor themes, tie in with glyph/image cache.
 
98
 
 
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
 
101
   when client quits).
 
102
 
 
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.
 
110
 
 
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).
 
114
 
 
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():
 
120
 
 
121
      wl_display_subscribe(display, id, new_id, my_version);
 
122
 
 
123
   or maybe
 
124
 
 
125
      wl_display_bind(display, id, new_id, my_version);
 
126
 
 
127
   Fixes a few things:
 
128
 
 
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.
 
132
 
 
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
 
137
 
 
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
 
142
      well.
 
143
 
 
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.
 
147
 
 
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.
 
154
 
 
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 ->
 
158
      client id hash.
 
159
 
 
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.
 
166
 
 
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.
 
170
 
 
171
    - clients needs to allocate the surface to be suitable for
 
172
      scanout, which they can do whenever they go fullscreen.
 
173
 
 
174
 - multihead, screen geometry and crtc layout protocol, hotplug, lcd
 
175
   subpixel info
 
176
 
 
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:
 
182
 
 
183
     interface "settings":
 
184
       event int_value(string name, int value)
 
185
       event string_value(string name, string value)
 
186
 
 
187
   but maybe it's better to just require that clients get that from
 
188
   somewhere else (gconf/dbus).
 
189
 
 
190
 - input device discovery, hotplug
 
191
 
 
192
    - Advertise axes as part of the discovery, use something like
 
193
      "org.wayland.input.x" to identify the axes.
 
194
 
 
195
    - keyboard state, layout events at connect time and when it
 
196
      changes, keyboard leds
 
197
 
 
198
    - relative events
 
199
 
 
200
    - multi touch?
 
201
 
 
202
    - synaptics, 3-button emulation, scim
 
203
 
 
204
 - auth; We need to generate a random socket name and advertise that
 
205
   on dbus along with a connection cookie.  Something like a method
 
206
   that returns the socket name and a connection cookie.  The
 
207
   connection cookie is just another random string that the client
 
208
   must pass to the wayland server to become authenticated.  The
 
209
   Wayland server generates the cookie on demand when the dbus method
 
210
   is called and expires it after 5s or so.
 
211
 
 
212
    - or just pass the fd over dbus
 
213
 
 
214
 - drm bo access control, authentication, flink_to
 
215
 
 
216
 - Range protocol may not be sufficient... if a server cycles through
 
217
   2^32 object IDs we don't have a way to handle wrapping.  And since
 
218
   we hand out a range of 256 IDs to each new clients, we're just
 
219
   talking about 2^24 clients.  That's 31 years with a new client
 
220
   every minute...  Maybe just use bigger ranges, then it's feasible
 
221
   to track and garbage collect them when a client dies.
 
222
 
 
223
 - Add protocol to let applications specify the effective/logical
 
224
   surface rectangle, that is, the edge of the window, ignoring drop
 
225
   shadows and other padding.  The compositor needs this for snapping
 
226
   and constraining window motion.  Also, maybe communicate the opaque
 
227
   region of the window (or just a conservative, simple estimate), to
 
228
   let the compositor reduce overdraw.
 
229
 
 
230
 - multi gpu, needs queue and seqno to wait on in requests
 
231
 
 
232
Clients and ports
 
233
 
 
234
 - port gtk+
 
235
 
 
236
    - draw window decorations in gtkwindow.c
 
237
 
 
238
    - Details about pointer grabs. wayland doesn't have active grabs,
 
239
      menus will behave subtly different.  Under X, clicking a menu
 
240
      open grabs the pointer and clicking outside the window pops down
 
241
      the menu and swallows the click.  without active grabs we can't
 
242
      swallow the click.  I'm sure there much more...
 
243
 
 
244
 - Port Qt?  There's already talk about this on the list.
 
245
 
 
246
 - X on Wayland
 
247
 
 
248
    - move most of the code from xf86-video-intel into a Xorg wayland
 
249
      module.
 
250
 
 
251
    - don't ask KMS for available output and modes, use the info from
 
252
      the wayland server.  then stop mooching off of drmmode.c.
 
253
 
 
254
    - map multiple wayland input devices to MPX in Xorg.
 
255
 
 
256
    - rootless; avoid allocating and setting the front buffer, draw
 
257
      window decorations in the X server (!), how to map input?
 
258
 
 
259
 - gnome-shell as a wayland session compositor
 
260
 
 
261
    - runs as a client of the wayland session compositor, uses
 
262
      clutter+egl on wayland
 
263
 
 
264
    - talks to an Xorg server as the compositing and window manager
 
265
      for that server and renders the output to a wayland surface.
 
266
      the Xorg server should be modified to take input from the system
 
267
      compositor through gnome-shell, but not allocate a front buffer.
 
268
 
 
269
    - make gnome-shell itself a nested wayland server and allow native
 
270
      wayland clients to connect and can native wayland windows with
 
271
      the windows from the X server.
 
272
 
 
273
 - qemu as a wayland client; session surface as X case
 
274
 
 
275
    - qemu has too simple acceleration, so a Wayland backend like the
 
276
      SDL/VNC ones it has now is trivial.
 
277
 
 
278
    - paravirt: forward wayland screen info as mmio, expose gem ioctls as mmio
 
279
 
 
280
    - mapping vmem is tricky, should try to only use ioctl (pwrite+pread)
 
281
 
 
282
    - not useful for Windows without a windows paravirt driver.
 
283
 
 
284
    - two approaches: 1) do a toplevel qemu window, or 2) expose a
 
285
      wayland server in the guest that forwards to the host wayland
 
286
      server, ie a "remote" compositor, but with the gem buffers
 
287
      shared.  could do a wl_connection directly on mmio memory, with
 
288
      head and tail pointers.  use an alloc_head register to indicate
 
289
      desired data to write, if it overwrites tail, block guest.  just
 
290
      a socket would be easier.
 
291
 
 
292
 - moblin as a wayland compositor
 
293
 
 
294
    - clutter as a wayland compositors
 
295
 
 
296
    - argh, mutter