From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Hlavaty Newsgroups: gmane.emacs.bugs Subject: bug#57372: no-toolkit menu popups do not respect emacs font configuration Date: Wed, 24 Aug 2022 20:54:24 +0200 Message-ID: <87h721iian.fsf@logand.com> References: <87lerek7pt.fsf@logand.com> <83k06y74sy.fsf@gnu.org> <87v8qihxbk.fsf@logand.com> <87czcp29m6.fsf@yahoo.com> <834jy17umv.fsf@gnu.org> <87mtbtipnx.fsf@logand.com> <834jy161rs.fsf@gnu.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="23180"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 57372@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 24 20:55:18 2022 Return-path: Envelope-to: geb-bug-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 1oQvX3-0005v2-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 20:55:17 +0200 Original-Received: from localhost ([::1]:60794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQvX2-0000mY-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Aug 2022 14:55:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQvWo-0000kG-MR for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 14:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQvWo-00085I-DI for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 14:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQvWn-0005x6-RS for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2022 14:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Hlavaty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Aug 2022 18:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57372 X-GNU-PR-Package: emacs Original-Received: via spool by 57372-submit@debbugs.gnu.org id=B57372.166136726922835 (code B ref 57372); Wed, 24 Aug 2022 18:55:01 +0000 Original-Received: (at 57372) by debbugs.gnu.org; 24 Aug 2022 18:54:29 +0000 Original-Received: from localhost ([127.0.0.1]:48227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQvWH-0005wE-Ga for submit@debbugs.gnu.org; Wed, 24 Aug 2022 14:54:29 -0400 Original-Received: from logand.com ([37.48.87.44]:45320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQvWF-0005w6-ET for 57372@debbugs.gnu.org; Wed, 24 Aug 2022 14:54:27 -0400 Original-Received: by logand.com (Postfix, from userid 1001) id 6846C1A17C2; Wed, 24 Aug 2022 20:54:26 +0200 (CEST) X-Mailer: emacs 28.1 (via feedmail 11-beta-1 I) In-Reply-To: <834jy161rs.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240654 Archived-At: On Wed 24 Aug 2022 at 19:32, Eli Zaretskii wrote: >> TTY menus seem fine except the extra > in menu-bar overlaps the next >> menu-bar item text. > > That's by design, btw. Strange design. Say I want to open the Edit menu. I press F10 and suddenly I cannot see the Edit menu anymore. > The implementation is extremely tricky, and basically blocks any input > as long as the menu is dropped down. It works by overwriting portions > of the frame display's glyph matrices. There are also complications > with binding keys to menu commands and with calculating the > coordinates where we need to drop down the menu. [...] >> In principle, it would be enough for me if the no-toolkit menus >> worked similar to TTY menus but respected faces instead of alien X >> resources. > > TTY menus work, the tricky issues notwithstanding, because there's > only one font on TTY frames, and thus each line of the menu text > overwrites some part of exactly one line of the frame display. That > is not possible to achieve on GUI frames, because faces and fonts > differ. So the same technique as we use for TTY menus will not work > for GUI frame,s unfortunately, and if we try going that way in the X > no-toolkit build, the code will have to be much more complicated (if > it's at all feasible), and I think the result will be uglier. I see that there are a lot of complications. What about doing it differently? For no-toolkit Emacs, it would be enough for me if the menu simply opened a *Menu* buffer with the relevant menu items. All those issues would suddenly disappear.