unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Spencer Baugh <sbaugh@catern.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Running with both PGTK and an X toolkit?
Date: Sat, 11 Mar 2023 07:44:02 +0800	[thread overview]
Message-ID: <87y1o4f9z1.fsf@yahoo.com> (raw)
In-Reply-To: <87pm9ghg28.fsf@catern.com> (Spencer Baugh's message of "Fri, 10 Mar 2023 13:49:36 +0000 (UTC)")

Spencer Baugh <sbaugh@catern.com> writes:

> I'd like to configure an Emacs with both PGTK (for Wayland and Broadway)
> and an X toolkit (for X - probably Lucid).  The reason is that I'd like
> to simultaneously have X frames open and Wayland/Broadway frames open.
>
> (More specifically, I think it would be cool to be able to use Broadway
> to connect to my Emacs remotely through a web browser, but I use X for
> my normal Emacs setup.)
>
> Is it possible to have both PGTK and an X toolkit configured into Emacs?
> I'm willing to do development work to make this work, if it's not
> categorically impossible.
>
> And if that is possible, is it possible to have two frames using two
> different windowing systems at the same time?  (I feel like I've heard
> about people doing that before, at least for other combinations)

It is going to be very difficult to use those two window systems at the
time, but not impossible, unlike running the NS port along with other
window systems in the same process, where the very different event
handling systems make it impossible to design a `select' that works
reliably with both.

The problem here is that most of our code assumes that only one window
system has been built into Emacs: FRAME_WINDOW_P, the Fx_* functions in
each TERMfns.c file, ifdefs in xdisp.c and menu.c,
Fmenu_or_popup_active_p, et cetera.

So you will have to make all of those (the list I gave is nowhere near
exhaustive) aware of more than one window system; this probably means
moving the Fx_* functions out of each terminal's fns.[cm] file and
making them dispatch to the right function based on the frame's window
system, and tediously examining every other window system test to
determine what to do.

We also have a big Display_Info typedef that is always the current
window system's Display_Info structure.  Either each window system's
Display_Info structure will have to be made the same, or x*.c must stop
directly accessing display information.



  reply	other threads:[~2023-03-10 23:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 13:49 Running with both PGTK and an X toolkit? Spencer Baugh
2023-03-10 23:44 ` Po Lu [this message]
2023-03-11  0:47   ` Spencer Baugh
2023-03-11  1:21     ` Po Lu
2023-03-11  8:09       ` Eli Zaretskii
2023-03-11  8:08     ` Eli Zaretskii
2023-03-11  8:04   ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1o4f9z1.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sbaugh@catern.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).