emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal matrices


From: Johan Myréen
Subject: Re: Terminal matrices
Date: Tue, 21 Jan 2025 19:43:10 +0200

With GTK it's virtually impossible to debug them.  When a menu
is visible, you are no more allowed to switch to any other application.

This is an X11 problem. In a KDE/Plasma/Wayland session on Linux I have no problem switching to another app from my Emacs built using --with-pgtk.



On Mon, 20 Jan 2025 at 21:06, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
martin rudalics <rudalics@gmx.at> writes:

>> NS does it differently. When I choose a buffer from the Buffer menu
>> while the child is selected, it changes the buffer in the child. Maybe
>> it's because of the "global" menu bar on macOS.
>
> Probably.  I have no ideas how GUI menus work internally in the first
> place.  With GTK it's virtually impossible to debug them.  When a menu
> is visible, you are no more allowed to switch to any other application.
> Hence the debugger is inaccessible and when you're in a callback
> function that's traced by the debugger, the debuggee is blocked forever.
> Which means that you have a frozen desktop and you have to leave it and
> kill the process of the debuggee by external means.  A nightmare.

Might be hard to believe, but that sounds familiar :-). If this is X11,
then it's a server grab, XGrabServer IIRC. You could run Emacs with
display on a nested X server or on an X server in a VM, then only that
server is grabbed and the original server is still usable. It's been
some decades since I last did that, with a nested server, but it worked
pretty well back then. That was Emacs and Lesstif/Motif, BTW :-).

>
>> Can you look at this part of tty menus?
>
> We'd have to decide what to do.  On a GUI the WM probably activates the
> window owning the menu bar and it will be likely hard to redirect the
> output of any function it calls back to the child frame.  As explained
> above, it will be at least hard to debug the Emacs process in order to
> find out who activates the root frame and how.
>
> Doing what most GUIs do now (selecting the root frame before invoking
> the menu) is not attractive either.  And not unifying the behavior of
> GUIs and ttys does not strike me as a good solution either.
>
> martin

Hm, maybe the tip above helps? I must admit that the NS behavior made
sense to me. But I must also say that I'm completely unfamiliar with
menus in Emacs. I've almost never used them.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]