x-popup-* blocking?
Thomas Koch <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm working on a Wayland Window Manager in Elisp using ewc.el presented by Michael Bauer at EmacsConf 2022. It uses River for the heavy lifting.
https://github.com/thkoch2001/rau
It was all fine until I accidentally right clicked on a tab and everything came to a hold.
```
(easy-menu-define words-menu global-map
"Menu for word navigation commands."
'("Words"
["Forward word" forward-word]
["Backward word" backward-word]))
(x-popup-menu t words-menu)
```
This will call create_and_show_popup_menu in Emacs' pgtkmenu.c. I believe that it blocks somewhere in there.
At the same time there is a network connection process in ewc.el:
```
(make-network-process :filter (ewc-filter client)
```
As long as I don't click on the popup everything is fine. I can also close it with ESC. But when I click on the popup, everything freezes, even the Mouse cursor.
River debug log:
> debug(input): entering cursor mode down
> debug(wm): manage sequence start
Emacs debug output:
> Gdk-Message: 18:37:26.260: button 1 press, seat 0x56b2f8a9dbc0 state 0
Nothing gets logged in the *Messages* buffer.
Note that the emacs process has two wayland protocol connections to River open here: First the pgtk connection where emacs is a regular client displaying its windows and then the connection implemented in ewc.el where emacs acts as a window manager.
I assume the next step is to compile Emacs with debug symbols and attach a gdb to it when it freezes. But maybe somebody already has some useful thoughts before that.
This probably all works as intended and I have to accept that Emacs is single-threaded.
Thank you, Thomas