From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Abysmal state of GTK build Date: Sun, 21 Aug 2022 21:30:38 +0800 Message-ID: <8735dplo5d.fsf@yahoo.com> References: <87ilmlluxq.fsf.ref@yahoo.com> <87ilmlluxq.fsf@yahoo.com> <87h725olz1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 21 15:32:04 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 1oPl3c-0002Xg-3U for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Aug 2022 15:32:04 +0200 Original-Received: from localhost ([::1]:60948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPl3b-0004Bp-1V for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Aug 2022 09:32:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPl2U-0003Pd-G8 for emacs-devel@gnu.org; Sun, 21 Aug 2022 09:30:55 -0400 Original-Received: from sonic317-32.consmr.mail.ne1.yahoo.com ([66.163.184.43]:46025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPl2R-00016j-Tz for emacs-devel@gnu.org; Sun, 21 Aug 2022 09:30:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1661088647; bh=nw5Nn0KN7dlNH++truq5JtbTnO6ZCwmEI2k4jvHMncQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=qdK/QGRqYZ0CKiG9ogwY5lGNRk0Vi3+D3a/Bwx8QCGZYpZaRSwankiW0PRsCMyUzQGs97PliXc2u/RXTaj1ptHIvD4QM49SrLcpP/PGv5XPMeSYUGffrfwAG8sLXQViz3CCbME5GzG+ln3rWptMOxQ1/wagFvvZq86E+i/4ye3JJqH2dXMYzKRdOoojYbFVArnMYtsn3HGMI0XMSVDXhJPNP3PXVgAI/asUbqFEy3qAOYENOK4+l9j9rMCdycFU8BPfoPdWn5uUp6En8ys4AISoTCk8cZ5upq6ZKG4urhxuUSBIls4VxMd/sgwvouy0/7BF7Jmti3Wk06v7medI1qw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1661088647; bh=YF+zapHYitX/JiTa+Qdmh5IfbF52letaCInjQeGHF9n=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=bcP+Er7UyuMCVxFYmG3vH5VTZ1D+xpW9LiWbnXaH5ib3eSWhbDWI3CXwqV50ycmhXX7ArmzU54Q6ueSpTczxmcz6hqgDjxukomG4D2ztR57+KGHnlucJvfJJb0bT6yvb0XAmvH2fknqi5fTBGON9UFooPE4iw7OSAnFnId8QfN0qLpwdk9sMAhn1SfhMJHps47aQNF8/XldXoVrt/+FO4DoH0XAxMaE91xUdec/5lkseXVERrZycg1z2JZe9e/y4XEdSmT2+m9R+lkuLv/Iorrky9p7BqG3xG+zWik7rxdokmENTtOJwjEKK2dGrHeebTckJcu76cCaO0uZXY7Qscg== X-YMail-OSG: 93QhHs8VM1kdHtmOgBq10hgzEb7rqEGjPhsnvxhAYQdP3B6qzyZO.XOh2TfO.4h mtta1xiGLOftDiZhDSJbcAiAr8I5Ax9Q.WJ7EU4U9QyebuD1IXRjivMDCwAttBLeSl.xxGiwfPj3 IyWjxF4D4RxVmoY.5wXT6c0VrZPGj4BtQfOSXLq.Pp_qJS8r52CvO3jYsRksuJEbxhoMi9rGKoWS wtRy2ZY7LCAJ_ZaKrrUHSApS4.k3fTIcNOdZfkySLmGntPLON9TgcpsRhdDsdIziSwC6zaXZPDz8 jQLieXp8muLWWUPeicn_meGo1Z.g3aL8ikHYuAhsOGNLEdtaE6JVD5oBJQVfGQtNv09c8d0DJJQ5 E8t_jAWlbQX1_scprYBvGlt75b6Rki4UlBZjgX6607ia4Sw11ouMCuCoXAjWmgNVJR9l1MvdKCSt rEH1.YmLJ_57fOqDkZrZ.lNquWNqgBRN0JasldiPpD5fafHFgGVrFBnSMsybvs9mqIxKRwl2PRE4 .tHBEDr_lvl7PRY09V3WcqkA3DEcEv4XPlrXc_OYAdjBpMnp76bEHQh.hWs77uPiUYxJsPkNEago lyzcDzQYHluxkBYyH26cPGKAFTh5lrextckaYB0LSnlTm1QitdM.1kf2s0SOA0BKhAeM7vjWSTRJ KuEEQIj7WBzHE.9AXcvVt5DrYs0906kPMJT_e.lfN6LpZEGpnELsrC13BfdxIOudHQfVPthqFwTd 6c0Fod0vuML_d1kvfLNzLaTCgeV9vse7IWwlZy0Uw4xoSA_7WVRfLf_8irvfjCTMhWBUNN2jRv24 xs1rY7ufB442hwHmMAMov6Voat_zlAFAE7nBtvCzqW X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sun, 21 Aug 2022 13:30:47 +0000 Original-Received: by hermes--canary-production-sg3-6f58cd9b5-pcmsn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8790839f4ba8cd71ba419f39dfc22e43; Sun, 21 Aug 2022 13:30:42 +0000 (UTC) In-Reply-To: <87h725olz1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 21 Aug 2022 13:49:22 +0200") X-Mailer: WebService/1.1.20560 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.43; envelope-from=luangruo@yahoo.com; helo=sonic317-32.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:293697 Archived-At: Lars Ingebrigtsen writes: > Yes, and we have to fix bug#56869 by working around the problem, as we > do with all OS/library-related issues. Just because it's something else > that's "wrong" doesn't mean we can ignore the issue. We cannot work around the problem because it is a NULL-pointer dereference in GTK, caused by it mishandling several events consecutively. In general, Emacs can only prevent GTK from handling certain events. If it handles an event that it must handle (in this case, XI_HierarchyChange) incorrectly, and that causes GTK to later dereference NULL, there is nothing that Emacs can do. Just like what happens when GTK calls _exit under our nose. > Anyway, I'm all in favour of defaulting to a no-toolkit build (across > all systems -- the astounding success of VS Code has show that having a > consistent look across systems is much more important than respecting > the look of the OS). I doubt that it would even be possible at all with our manpower to implement "our own toolkit" on all platforms. Especially on systems like macOS, where AFAICT the system tries its best to prevent you from implementing certain things yourself (such as tooltips and popup menus, the former proved to be a royal pain in the neck earlier.) Besides, how is that related to the success of Microsoft's VS Code? I think it is more related to how much support it gets from toolchain developers, caused by Microsoft bundling it with their GitHub platform, much like they bundled MSIE with Windows 95. Cargo culting their choice of toolkit will not do us much good. > But we have to fix the no-toolkit look before we can contemplate that. > > 1) New toolbar icons: > > > > > > > We need somebody, preferably a designer, to put together a set of > consistent (and pretty) toolbar icons. The toolbar icons come from GNOME 2.x, so they are already consistent and (mostly) put together by designers. Aside from the ugly cross icon, which really has to go. > 2) Background glitches: > > I've got *background: black, and that makes "emacs -Q" look like this: > > > > > > > That has to be fixed. Just turn off the internal border, or specify the color of the internal border in your X resources. The default size of the internal border is intentionally different across different builds and window systems, to make up for different looking decorations. > 3) Menu bar font: > > > > > Must be proportional to not look like an artefact of the 80s. I'd be glad if someone worked on that. At the same time, we could make RTL text work there as well. > 4) HiDPI problems in the menus: The menus are unreadably small on a > HiDPI display. The fix is to specify a larger font for the menus. But see below for more problems with the oldXMenu library: > 5) The scroll bar has to be fixed to work as modern scroll bars to, not > emulate the actions of an 80s Xterm. I.e., you have to be able to drag > the scrool widget, and click above and below it, and have the thing > happen that normal users expect. I disagree, but that behavior should be made customizable. The "no-toolkit" scroll bar in general is a big hack that is not portable to platforms other than X. > Once those five things are in place, we should default to a no-toolkit > build, which will give us a lot more control of Emacs behaviour, and not > rely on odd tics in each toolkit, and in addition, allow > daemon/multi-display shutdown to work reliably. The no-toolkit build can not work on any other platform other than X. The scroll bars are implemented by Emacs itself in a very non-portable way, and the menus are implemented by the old XMenu library that came with X10 and early X11 releases. All of that amounts to a large amount of code that is very difficult to replicate on other platforms. Thanks.