From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: porting to Wayland Date: Sun, 13 Jul 2014 09:12:17 +0900 Message-ID: <87fvi6unfi.fsf-ueno@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1405210354 25008 80.91.229.3 (13 Jul 2014 00:12:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jul 2014 00:12:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 13 02:12:29 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X67P2-0005Lg-3k for ged-emacs-devel@m.gmane.org; Sun, 13 Jul 2014 02:12:28 +0200 Original-Received: from localhost ([::1]:50691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X67P1-0002lw-Le for ged-emacs-devel@m.gmane.org; Sat, 12 Jul 2014 20:12:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X67Ox-0002lo-UC for emacs-devel@gnu.org; Sat, 12 Jul 2014 20:12:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X67Ow-0007iT-73 for emacs-devel@gnu.org; Sat, 12 Jul 2014 20:12:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X67Ow-0007i9-3I for emacs-devel@gnu.org; Sat, 12 Jul 2014 20:12:22 -0400 Original-Received: from du-a.org ([2001:e41:db5e:fb14::1]:40840 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X67Ov-00075E-JZ for emacs-devel@gnu.org; Sat, 12 Jul 2014 20:12:21 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173007 Archived-At: 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 -- Daiki Ueno