From: Po Lu <luangruo@yahoo.com>
To: Akira Kyle <ak@akirakyle.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Emacs developers <emacs-devel@gnu.org>
Subject: Re: SVG widget in GNU Emacs
Date: Wed, 27 Oct 2021 17:47:03 +0800 [thread overview]
Message-ID: <874k92sstk.fsf@yahoo.com> (raw)
In-Reply-To: <CAPWcbYEjpKtq1PKemv8gg0cnL9=Vp95TyEtaSMqmAkVAbS_LAQ@mail.gmail.com> (Akira Kyle's message of "Tue, 26 Oct 2021 00:32:55 -0600")
Akira Kyle <ak@akirakyle.com> writes:
> IMHO the current xwidget implementation in emacs should deprecated.
Even though it's not very polished at present, I've seen a great deal of
code rely on the existing xwidgets support. I think it would be best to
not make it obsolete.
> Po, if you're seriously considering cleaning up this code, it might be
> wise to take a step back and consider what features its trying to
> provide and how. There's a fundamental tension between the
> buffer/window model of emacs and the way gtk implements a MVC paradigm
> that makes it nontrivial for them to be compatible. This situation has
> only worsened as gtk has been moving its api's to better support a
> future with heavy reliance on gpu rendering. IIRC this means the
> offscreen rendering technique employed by xwidgets is being deprecated
> in gtk. Furthermore xwidgets was implemented before webkit was
> transitioned to a containerized worker process architecture so there's
> bugs one has to work through as gtk attempts to take back control of
> things like signal masks that emacs controls when it initializes gtk.
> My impression has actually been that the nsxwidgets have worked far
> better and reliably since that was merged (in fact I remember coming
> across some emacs package out there that relied on xwidgets, but that
> only supported it on macOS as something or another was broken with
> xwidgets on gtk). I suspect the transition from x11 to wayland has
> introduced a lot of bugs and difficulties for really complex gtk
> widgets like webkitgtk.
I understand what the problem in this area is. But I'd rather have the
existing and (mostly) working xwidgets feature fixed than to waste time
implementing a new one.
> Ultimately I'd rather see effort go into getting pure gtk merged and
> working to eliminate the mess of inpure mixtures of gtk and x11 code
> from emacs (there could of course still be a "pure" X backend for
> those who desire to run emacs with motif). I think as time goes on, it
> will look worse and worse for emacs to need xwayland to run, as
> distributions will stop including it by default.
The pure GTK port will do nothing to resolve the issues here. I worked
with that port a while ago, eventually porting it to GTK 4, but quickly
lost interest not soon after that.
In fact, I don't even see the problem with running Emacs in Xwayland.
I've been doing that for years ever since Fedora switched to using
Wayland by default, and I've never had any non-minor problems.
All and all, the PGTK port still keeps the existing X11+Cairo display
architecture. On the GTK3 version of that port, xwidgets still work
like they do on X and NS. They will not work on GTK 4 anyway, as the
GTK developers have deleted the ability to draw off-screen.
> Also I think there's a lot of work to be done on xdisp.c. As I've seen
> here and elsewhere, there seems to be sustained interest in richer,
> flexible display options to support things like multicolumns or
> buffers in buffers without resorting to clever hacks that work around
> around the limitations of the current linear character arrays that
> emacs represents buffer data as. Browsers with the DOM have obviously
> already solved this problem in a very general way, and it's quite
> popular these days to leave such complexity and optimization effort to
> the browser engine devs and use something like electron. I doubt the
> emacs devs or maintainers would ever consent to running emacs on top
> of chromium or webkit (although there's already the effort to have
> emacs run on servo here https://github.com/emacs-ng/emacs-ng but that
It uses WebRender as a window system for Emacs, not Servo.
next prev parent reply other threads:[~2021-10-27 9:47 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 2:00 SVG widget in GNU Emacs Anand Tamariya
2021-10-20 3:15 ` Po Lu
2021-10-20 12:09 ` Eli Zaretskii
2021-10-20 12:48 ` Po Lu
2021-10-20 13:08 ` Eli Zaretskii
2021-10-20 13:17 ` Po Lu
2021-10-20 14:13 ` Eli Zaretskii
2021-10-26 6:32 ` Akira Kyle
2021-10-26 12:32 ` GUI and redisplay work (was: SVG widget in GNU Emacs) Stefan Monnier
2021-10-26 12:51 ` Stefan Kangas
2021-10-26 13:23 ` Eli Zaretskii
2021-10-26 13:19 ` Eli Zaretskii
2021-10-27 16:07 ` Alexandre Garreau
2021-10-27 17:12 ` tomas
2021-10-27 19:00 ` Alexandre Garreau
2021-10-29 17:34 ` GUI and redisplay work Arthur Miller
2021-10-29 19:29 ` Alexandre Garreau
2021-10-29 20:05 ` Alexandre Garreau
2021-10-27 9:47 ` Po Lu [this message]
2021-10-27 12:10 ` SVG widget in GNU Emacs Eli Zaretskii
2021-10-27 12:25 ` Po Lu
2021-10-27 20:01 ` Akira Kyle
2021-10-28 1:21 ` Po Lu
2021-10-28 13:50 ` Fix flickering on X11 xwidgets (was: Re: SVG widget in GNU Emacs) Po Lu
2021-10-27 19:49 ` SVG widget in GNU Emacs Akira Kyle
2021-10-28 1:15 ` Po Lu
2021-10-28 6:15 ` Eli Zaretskii
2021-10-28 9:39 ` Po Lu
2021-10-20 22:35 ` Richard Stallman
2021-10-20 23:37 ` dalanicolai
2021-10-21 0:31 ` dalanicolai
2021-10-21 0:07 ` Po Lu
2021-10-20 8:15 ` Lars Ingebrigtsen
2021-10-20 9:13 ` Anand Tamariya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874k92sstk.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=ak@akirakyle.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.