emacs-devel
[Top][All Lists]
Advanced

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

Re: What improvements would be truly useful?


From: Daniel Colascione
Subject: Re: What improvements would be truly useful?
Date: Thu, 8 Mar 2018 10:02:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/08/2018 08:24 AM, Alan Third wrote:
On Thu, Mar 08, 2018 at 03:20:58PM +0200, Eli Zaretskii wrote:
From: Philipp Stephani <address@hidden>
Date: Wed, 07 Mar 2018 21:45:46 +0000
Cc: Daniele Nicolodi <address@hidden>, address@hidden

By adding a gtkterm.c, that does the same as w32term.c, just for GTK, without 
referring to X.org in any way?
The cleanup would then consist in removing all GTK functionality from xterm.c 
once gtkterm.c is stable.

(I guess you meant removing GTK-related portions of xfns.c as well?)

If you look at these two files, you will see that the GTK-specific
snippets in them are a few and far between.  Most of the code is
generic.

That’s part of the problem with how Emacs deals with GTK, it does many
things the X way rather than the GTK way.

For example, mouse and keyboard events are dealt with using X code,
but GTK provides it’s own APIs for dealing with them. I thought
implementing touch events would be easy because GTK already does all
the heavy lifting, but Emacs doesn’t use GTK for events.

I strongly suspect a Wayland compatible GTK Emacs would have to remove
a lot of (all?) X code and replace it with GTK code.

My understanding of this sub-thread was that the idea was to separate
GTK _architecturally_, not just making it yet another display
back-end.

I don’t think I understand the difference.

Emacs can be compiled with support for many different window systems, such as X11, MS-Windows, and Cocoa/NS. Currently, having chosen the X11 window system, you can go on to choose which toolkit you want to use: Motif, GTK2, GTK3, Lucid, and so on.

The proposal is to promote GTK support from an X11 toolkit to a top-level window system, excising, in the process, the GTK display back-end of any mention of X11.

I think it's an excellent project and one important to the future maintainability of the project. As much as it saddens* me to say so, X11 is dying, while GTK will continue to be a decent abstraction that will hit the happy, conventional path of GNU/Linux input and display infrastructure. Emacs X11 integration being unusual and dubiously legal has caused compatibility problems in the past, particularly with systems like NX.

As part of this effort, I'd love to see more abstraction in the window system selection. All the xterm.c functions that we carefully replicate in every window system really should be a table of frame-specific function pointers, and we should be able to compile a single Emacs binary with support for all window systems enabled simultaneously.

* IMHO, Wayland should be been a series of new X protocol extensions, not a greenfield project.



reply via email to

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