Core wayland protocol
- - Move map_* requests to wl_shell as set_*, rename to
- wl_desktop_shell. Make initial attach the request that shows the
- surface and make attach with 0 buffer show the surface. Drop the
- map concept at that point. Make wl_shell the EWMH of wayland.
- Handle window title, icons, lower window, needs attention,
- minimize, maximize, move to desktop?
+ - Maybe try to make remote wayland actually happen, to see if there
+ is something in the protocol/architecture that makes it harder than
+ it should be.
- - scanner: wl_* prefix removal: split it out into a namespace part so
- we can call variables "surface" instead of "wl_surface"?
+ICCCM
- - Framebased input event delivery.
+ - mime-type guidelines for data_source (ie, both dnd and selection):
+ recommended types for text or images, types that a clipboard
+ manager must support, mime-types must be listed in preferred order
+
+ - we need a "no kb focus please" mechanism. Or should this be
+ implicit in a specific surface type?
+
+EWMH
+
+ - configure should provide dx_left, dx_right, dy_top, dy_bottom, or
+ dx, dy, width and height.
+
+ - move to workspace, keep on top, on all workspaces, minimize etc
+ requests for implementing client side window menu? or just make a
+ "show window menu" request to let the compositor display and manage
+ a popup window?
+
+ - window move and resize functionality for kb and touch.
+
+ - Protocol for specifying title bar rectangle (for moving
+ unresponsive apps). Rectangle for close button, so we can popup
+ force-close dialog if application doesn't respond to ping event
+ when user clicks there. We could use the region mechanism here
+ too.
+
+ - popup placement protocol logic.
+
+ - subsurface mechanism. we need this for cases where we would use an
+ X subwindow for gl or video other different visual type.
+
+EGL/gbm
+
+ - Land Robert Braggs EGL extensions: frame age, swap with damage
+
+ - Make it possible to share buffers from compositor to clients.
+ Tricky part here is how to indicate to EGL on the server side that
+ it should make an EGLImage available to a client. We'll need a
+ "create a wl_buffer for this EGLImage for this client" kind of
+ entry point.
- Protocol for arbitrating access to scanout buffers (physically
contiguous memory). When a client goes fullscreen (or ideally as
allocate a scanout buffer now" event to the fullscreen-to-be
client.
- - Next steps based on EGL_WL_bind_display: create EGLImageKHR from
- shm buffers? async auth in the implementation of the extension?
-
- - wayland-egl: lazy-copy-back swapbuffer, sub-window, scanout flags
- for fullscreen.
-
- - configure should provide dx_left, dx_right, dy_top, dy_bottom, or
- dx, dy, width and height.
-
- - surface.set_grab_mode(GRAB_OWNER_EVENTS vs GRAB_SURFACE_EVENTS), to
- make menus work right: click and drag in a menubar grabs the
- pointer to the menubar (which we need for detecting motion into
- another menu item), but we need events for the popup menu surface
- as well.
- - The message format has to include information about number of fds
- in the message so we can skip a message correctly. Or we should
- just give up on trying to recover from unknown messages. We need
- to make sure you never get a message from an interface you don't
- know about (using per-client id space and subscribe) or include
- information on number of fds, so marshalling logic can skip.
-
- - generate pointer_focus (and drag focus) on raise/lower, move
- windows, all kinds of changes in surface stacking.
+Misc
- glyph cache
+ - Needs a mechanism to pass buffers to client.
+
buffer = drm.create_buffer(); /* buffer with stuff in it */
cache.upload(buffer, x, y, width, height, int hash)
cache.retire: buffer /* cache has stopped using buffer, please
* reupload whatever you had in that buffer */
- - DnD issues:
-
- - Drag should not be tied to a source surface, just the client.
- the grab will break if the surface goes away, but the wl_drag
- struct doesn't need to hold on to the source surface.
-
- - Root window must send NULL type (to decline drop) or
- x-wayland/root-something type if the source offers that. But
- the target deletes the drag_offer object when drag.pointer_focus
- leaves the surface...
-
- - How do we animate the drag icon back to the drag origin in case
- of a failed drag? Client should set drag icon separately,
- compositor can do it then.
-
- - How to handle surfaces from clients that don't know about dnd or
- don't care? Maybe the dnd object should have a
- dnd.register_surface() method so clients can opt-in the surfaces
- that will participate in dnd. Or just assume client is not
- participating until we receive an accept request.
-
- - Selection/copy+paste issues: is it sufficient to only introduce
- the selection offer when a client receives kb focus? Or maybe
- it is actually a security feature? Clipboard manager in server
- for retained selections?
-
- - Pointer image issue:
-
- - A direct touch input device (eg touch screen) doesn't have a
- pointer; indicate that somehow.
-
- - Cursor themes, tie in with glyph/image cache.
-
- A "please suspend" event from the compositor, to indicate to an
application that it's no longer visible/active. Or maybe discard
buffer, as in "wayland discarded your buffer, it's no longer
switching away from. for minimized windows that we don't want live
thumb nails for. etc.
- - Per client id space. Each client has an entire 32 bit id namespace
- to itself. On the server side, each struct wl_client has an object
- hash table. Object announcements use a server id space and clients
- must respond with subscribe request with a client id for the
- object. Part of wl_proxy_create_for_id():
-
- wl_display_subscribe(display, id, new_id, my_version);
-
- or maybe
-
- wl_display_bind(display, id, new_id, my_version);
-
- Fixes a few things:
-
- - Maps the global object into the client id space, lets client
- allocate the id. All ids are allocated by the client this way,
- which fixes the range protocol problem.
-
- - Tells the server that the client is interested in events from
- the object. Lets the server know that a client participates in a
- certain protocol (like drag and drop), so the server can account
- for whether or not the client is expected to reply
-
- - Server emits initial object state event(s) in reponse to
- receiving the subscribe request. Introduces an extra round trip
- at initialization time, but the server will still announces all
- objects in one burst and the client can subscribe in a burst as
- well.
-
- - Separates client resources, since each client will have it's own
- hash table. It's not longer possible to guess the id of another
- surface and access it.
-
- - Server must track the client id for each client an object is
- exposed to. In some cases we know this (a surface is always
- only owned by one client), in other cases it provides a way to
- track who's interested in the object events. For input device
- events, we can look up the client name when it receives pointer
- focus or keyboard focus and cache it in the device.
-
- - Server must know which id to send when passing object references
- in events. We could say that any object we're passing to a
- client must have a server id, and each client has a server id ->
- client id hash.
-
- - LCD subpixel info, dpi, monitor make and model, event when a
- surface moves from one output to another.
-
- - input device discovery, hotplug
-
- - Advertise axes as part of the discovery, use something like
- "org.wayland.input.x" to identify the axes.
-
- - keyboard state, layout events at connect time and when it
- changes, keyboard leds
-
- - relative events
-
- - multi touch?
-
- - synaptics, 3-button emulation, scim
-
- - drm bo access control, authentication, flink_to
-
- - Range protocol may not be sufficient... if a server cycles through
- 2^32 object IDs we don't have a way to handle wrapping. And since
- we hand out a range of 256 IDs to each new clients, we're just
- talking about 2^24 clients. That's 31 years with a new client
- every minute... Maybe just use bigger ranges, then it's feasible
- to track and garbage collect them when a client dies.
-
- - Add protocol to let applications specify the effective/logical
- surface rectangle, that is, the edge of the window, ignoring drop
- shadows and other padding. The compositor needs this for snapping
- and constraining window motion. Also, maybe communicate the opaque
- region of the window (or just a conservative, simple estimate), to
- let the compositor reduce overdraw.
-
- - Protocol for specifying title bar rectangle (for moving
- unresponsive apps) and a rectangle for the close button (for
- detecting ignored close clicks).
-
- - multi gpu, needs queue and seqno to wait on in requests
-
- - libxkbcommon
-
- - pull in actions logic from xserver
-
- - pull in keycode to keysym logic from libX11
-
- - expose alloc functions in libxkbcommon, drop xserver funcs?
-
- - pull the logic to write the xkb file from xkb_desc and names
- into libxkbcommon and just build up the new xkb_desc instead of
- dump+parse? (XkbWriteXKBKeymapForNames followed by
- xkb_compile_keymap_from_string in XkbDDXLoadKeymapByNames)
-
- - pull in keysym defs as XKB_KEY_BackSpace
-
- - figure out what other X headers we can get rid of, make it not
- need X at all (except when we gen the keysyms).
-
- - Sort out namespace pollution (XkbFoo macros, atom funcs etc).
-
- - Sort out 32 bit vmods and serialization
-
- - Automatic "triple buffering", ie, don't block on vsync if we're
- repainting below the refresh rate.
-
- - surface.attach triggers a compositor.release_buffer event when
- the buffer can be used again without messing things up (ie, it's
- no longer the front buffer, or the compositor has attached the
- new surface).
-
- - compositor sends out a repaint event (to who? do clients have to
- ask for this like they ask for the frame event?) once it has
- repainted the scene with the recent updates.
-
- - once a client receives the repaint event, it should start
- rendering its next frame. If it has received a buffer release
- event for the old buffer, that can be reused, otherwise it has
- to allocate a third buffer (ie, we automatically do triple
- buffering for fullscreen surfaces).
-
- - if a client is triple buffering and receives a release event
- before the repaint event, it can go back to double buffering.
-
- - the repaint event needs some kind of timestamp to drive
- animations, since clients may not use the frame event at all.
- Could just be the time of the most recent frame.
-
Clients and ports
- SDL port, bnf has work in progress here:
http://cgit.freedesktop.org/~bnf/sdl-wayland/
- - libva + eglimage + kms integration
-
- - X on Wayland
-
- - map multiple wayland input devices to MPX in Xorg.
-
- - rootless; avoid allocating and setting the front buffer, draw
- window decorations in the X server (!), how to map input?
-
Ideas