From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: porting to Wayland Date: Sun, 13 Jul 2014 11:03:00 +0200 Message-ID: <53C24B44.3000304@swipnet.se> References: <87fvi6unfi.fsf-ueno@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1405242204 26305 80.91.229.3 (13 Jul 2014 09:03:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jul 2014 09:03:24 +0000 (UTC) To: Daiki Ueno , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 13 11:03:17 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 1X6Fgi-000424-OP for ged-emacs-devel@m.gmane.org; Sun, 13 Jul 2014 11:03:16 +0200 Original-Received: from localhost ([::1]:51577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6Fgi-0006ZG-8w for ged-emacs-devel@m.gmane.org; Sun, 13 Jul 2014 05:03:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6Fgc-0006YH-3R for emacs-devel@gnu.org; Sun, 13 Jul 2014 05:03:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6FgX-00057R-EH for emacs-devel@gnu.org; Sun, 13 Jul 2014 05:03:10 -0400 Original-Received: from mailfe08.swip.net ([212.247.154.225]:41877 helo=swip.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6FgX-00057F-7g; Sun, 13 Jul 2014 05:03:05 -0400 X-T2-Spam-Status: No, hits=0.0 required=5.0 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 517588583; 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 In-Reply-To: <87fvi6unfi.fsf-ueno@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.247.154.225 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:173011 Archived-At: 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 >