unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: 60510@debbugs.gnu.org
Subject: bug#60510: 30.0.50; [PATCH] Do not put pointer on first menu item in no-toolkit build
Date: Tue, 03 Jan 2023 15:30:15 +0200	[thread overview]
Message-ID: <834jt721aw.fsf@gnu.org> (raw)
In-Reply-To: <87ilhnpxx5.fsf@ledu-giraud.fr> (message from Manuel Giraud on Tue, 03 Jan 2023 14:09:26 +0100)

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,  60510@debbugs.gnu.org
> Date: Tue, 03 Jan 2023 14:09:26 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> [...]
> 
> > This is age-old behavior, common also with TTY menus.  We should at
> > least change all of them.  And frankly, I'm not sure we should change
> > it, after so many years.  Someone might depend on this behavior.
> 
> Yes, as this is part of oldXMenu, I suspected that.
> 
> So more generally, I kind of like the no toolkit backend but I want to
> be able to modify it (my pipe dream being able to use emacs face
> machinery to write to those menus).  What would be my best bet here?
> Rewrite a plain X11 backend from scratch?

Sorry, I don't understand: AFAIK oldXMenu is not used by any build
other than the no-toolkit build.  So why cannot you modify it?

What I wrote above doesn't prevent anyone from making changes, I was
just thinking aloud whether we should make this particular change.

To answer your more general question: to use faces, you must use the
Emacs display code to generate the glyphs and deliver them to the
glass.  Basically, you must abandon oldXMenu and re-implement the
menus using the Emacs display code.  The main problem here is that
menus are drop-down, i.e., they overlap stuff already on the glass,
and Emacs currently doesn't allow that.  (TTY menus pull that trick,
but they can only get away because all the characters have the same
dimensions on TTY frames, something that is not true for X display,
assuming you want to use font parts of the faces, not just their
colors.)  So you'd need some other trick here, maybe using child
frames?





  parent reply	other threads:[~2023-01-03 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 10:03 bug#60510: 30.0.50; [PATCH] Do not put pointer on first menu item in no-toolkit build Manuel Giraud
2023-01-03 12:48 ` Eli Zaretskii
2023-01-03 13:09   ` Manuel Giraud
2023-01-03 13:25     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-03 13:30     ` Eli Zaretskii [this message]
2023-01-03 13:57       ` Manuel Giraud
2023-01-03 13:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=834jt721aw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60510@debbugs.gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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