From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.devel Subject: Re: long-standing GTK bug Date: Thu, 03 Mar 2022 15:13:04 +0530 (IST) Message-ID: <20220303.151304.1149556246650184966.enometh@meer.net> References: <871qzktpd8.fsf@yahoo.com> <87pmn3sdpm.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="19116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: luangruo@yahoo.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 03 10:44:49 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nPi0u-0004oP-SI for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Mar 2022 10:44:48 +0100 Original-Received: from localhost ([::1]:50916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPi0t-0002VN-Nj for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Mar 2022 04:44:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPhza-0001QB-7o for emacs-devel@gnu.org; Thu, 03 Mar 2022 04:43:26 -0500 Original-Received: from smtp6.ctinetworks.com ([205.166.61.199]:45708) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPhzY-00056x-H0 for emacs-devel@gnu.org; Thu, 03 Mar 2022 04:43:25 -0500 Original-Received: from localhost (unknown [117.193.10.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp6.ctinetworks.com (Postfix) with ESMTPSA id 6D25786095; Thu, 3 Mar 2022 04:43:12 -0500 (EST) In-Reply-To: <87pmn3sdpm.fsf@yahoo.com> X-Mailer: Mew version 6.8 on Emacs 29.0.50 X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: 6D25786095.A6513 X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Watermark: 1647164600.38703@rXEmyDRhn/78inDAAZoQlQ Received-SPF: pass client-ip=205.166.61.199; envelope-from=enometh@meer.net; helo=smtp6.ctinetworks.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286780 Archived-At: * Po Lu <87pmn3sdpm.fsf@yahoo.com> Wrote on Thu, 03 Mar 2022 15:21:57 +0800 > Madhu writes: >> I tried to do a proof of concept using XSetIOErrorExitHandler to >> prove it was possible to kill the display and still have a gtk app >> running. >> https://gitlab.gnome.org/enometh/simple4/-/raw/master/simple.c >> which seemed to work. the code is a bit crufty as it includes the >> longjmp path , and i have to reread it to understand it and my >> headaches are interfering with thinking. When i checked there was >> some other snag in moving this to emacs > > Display *dpy = gdk_x11_display_get_xdisplay(gdpy); > XSetIOErrorExitHandler (dpy, x_io_error_exit_handler, &done); > > => window = gtk_window_new (); > gtk_window_set_title (GTK_WINDOW (window), "hello world"); > > Judging by the absence of arguments to `gtk_window_new', this code is > for GTK 4, correct? > > The X and GTK configuration will never work with GTK 4 due to other > fundamental changes in the toolkit, and PGTK will not be able to access > X-specific APIs. All very sad, yes. I've pushed a version of the sample code which should compile and run with gtk+-3.0 - maybe you could take a look.