unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Running with both PGTK and an X toolkit?
Date: Sat, 11 Mar 2023 10:04:07 +0200	[thread overview]
Message-ID: <83edpvyars.fsf@gnu.org> (raw)
In-Reply-To: <87y1o4f9z1.fsf@yahoo.com> (message from Po Lu on Sat, 11 Mar 2023 07:44:02 +0800)

[This discussion doesn't belong here, it belongs on emacs-devel.]

> From: Po Lu <luangruo@yahoo.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 11 Mar 2023 07:44:02 +0800
> 
> 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.

Same with the MS-Windows frames.

So I think this kind of mixing is only possible on GNU and Unix
systems, where the same 'select' (or similar) call can handle several
"window systems".

> 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.

That is true, but the real problem is only in name clashes, I think.
Most, if not all, of the actual interfaces are called through
dispatches that accept the frame or its terminal object as an
argument, so it should be easy to make them call the correct
implementation.

> 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.

Yes, Display_Info variables will need to become function calls that
return a public portable structure, not something that is defined
differently for each window-system.



      parent reply	other threads:[~2023-03-11  8:04 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
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 [this message]

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=83edpvyars.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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.
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).