emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: porting to Wayland


From: Jan Djärv
Subject: Re: porting to Wayland
Date: Sun, 13 Jul 2014 11:03:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hello.

I have updated the YAMAMOTO Mitsuharu patch:
http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00390.html

It all works except some image glitches.
It does not add another window system, rather expands the xterm.c code.
I was expecting that Gtk3+ and Cairo together would let us re-enable double buffering in Gtk and thus get that for free. Unfortunately this did not work, as Gtk needs to do its drawing in the event loop, like the NS port needs to do as mentioned in #17124.

I will probably check this in if I get round to writing all those ChangeLog entries and fix the image things. There is actually not much user benefit from using Cairo, except Mitsuharus printing extension. For Wayland, there is XWayland. Using Cairo is actually slower than using X, sometimes visible so. Making Cairo draw the same way we draw in X may be a suboptimal way to use Cairo.

        Jan D.

2014-07-13 02:12, Daiki Ueno skrev:
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]