From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.help Subject: Re: Running with both PGTK and an X toolkit? Date: Sat, 11 Mar 2023 00:47:55 +0000 (UTC) Message-ID: <87mt4kgll1.fsf@catern.com> References: <87pm9ghg28.fsf@catern.com> <87y1o4f9z1.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2546"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Po Lu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 01:48:55 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1panPo-0000PN-Fg for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 01:48:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1panOy-0006wc-16; Fri, 10 Mar 2023 19:48:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1panOw-0006wP-CL for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 19:47:58 -0500 Original-Received: from wrqvbcnz.outbound-mail.sendgrid.net ([149.72.188.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1panOu-0001Q7-OP for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 19:47:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=76iY8ToGfdfyoCF1SV5vpOS31eokQmWpHl0ZzLKm3Io=; b=B3EMUq1qTCEqKr3VerlloWlW8qY1E/jiMMDcZH8xD+wnoIWfF/huVqz2HdQSY7LuW7+r IuX6ph7HyS/RCSaySe7X9hFjk8Von3AdmeUr+Nn6cxmRh3Pq6esWS1NjXHMUyQo0UldGgP RwD68mCsMte8+FtjQptlBT1KaP2o6efBQwKabEvCwK5C6mgyWGyRYU4/wbqa3aeFVxf17o 2hYbLUvQr+Zu2FwqQYd+J36XRmjmxnI0ZTEBCYyaMNPDNC/rtxjiNVXY/kghdTr+nwRdJP 9NTpHV6IBsyfrgUS3z2Uj/59FWhTCqyuNoQbNnOxS5Nm/MtawQJ+7EhphY9wn6NA== Original-Received: by filterdrecv-6c845fd887-wdhkt with SMTP id filterdrecv-6c845fd887-wdhkt-1-640BCFBB-A 2023-03-11 00:47:55.32169926 +0000 UTC m=+1473311.416633003 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-22 (SG) with ESMTP id u6n8LyQbQ3uJUtPnSasBdQ Sat, 11 Mar 2023 00:47:55.207 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id B20126009F; Fri, 10 Mar 2023 19:47:54 -0500 (EST) In-Reply-To: <87y1o4f9z1.fsf@yahoo.com> X-SG-EID: =?us-ascii?Q?GW3oCMoYnalRiojMOuLzE6x2H5kORXvlCdz1UwQVRMVT4fbh9ODEfCogOe74cO?= =?us-ascii?Q?rI4e0V+MFZgakz9Re5a6=2FCgsSkHl1Ib59UR=2F4Vi?= =?us-ascii?Q?jo7mWhugkj9gQ6dpFtz5fJyupLNRuI6Lk8EkDAM?= =?us-ascii?Q?aA6MtK94jDfl10x3QdTRrtX9kUo3e9zwcn9hVXV?= =?us-ascii?Q?It1eWCjpTSASInWCTLU7QQ7e6E9tHk9RtfGx5vM?= =?us-ascii?Q?eAeB+GL8C5RX4xWLvQPqVC562PBle0gjrSuEE+?= X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Received-SPF: pass client-ip=149.72.188.46; envelope-from=bounces+21787432-cf9a-help-gnu-emacs=gnu.org@em8926.catern.com; helo=wrqvbcnz.outbound-mail.sendgrid.net X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142975 Archived-At: Po Lu writes: > Spencer Baugh 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. OK, interesting. From looking at it, it seems like probably I won't need *too* deep of an understanding to deal with most of it - it's mostly a lot of toil. It seems like it's something I could do. Is this a change which would be interesting to upstream? I'm hesitant to embark on it if not... Also, are there any smaller component changes which would be interesting upstream?