Hi,
As a learning project, I'm trying to port Emacs to the Wayland display
server[1]. Now the very basic redisplay code started working, although
it's still buggy (it even doesn't start without -Q):
Video: http://du-a.org/~ueno/junk/emacs-wl.webm
Code: https://github.com/ueno/emacs/tree/wip/wl
Rendering in Wayland is entirely done by the client, and the server
simply reveals the part of buffer sent from the client. So, the main
task is to replace all the Xlib-based rendering stuff with the
buffer-based rendering using cairo.
I originally thought it could be done as an "add-on" to the current X
toolkit support. As GTK3 already has the Wayland backend, it should be
able to embed the Emacs surface. However, after looking at the code
(xterm.c/xfns.c), I realized that large part of it relies on Xlib and
seems too hard (for me) to experiment, without breaking the existing
code. So, my initial attempt is to add it as another "window system"
(like NS or W32).
Currently it's missing:
- proper color handling
- images
- some text decoration (underline, overline, overstrike)
- toolkit stuff (window decoration, menubar, toolbar, scrollbar)
and many more. Perhaps anybody here already considered/tried this?
Regards,
Footnotes:
[1] http://wayland.freedesktop.org