Subject: bug#16479: 24.3.50; daemon freeze with tty menus

From: Stefan Monnier <[email-masked]>
Date: Mon, 20 Jan 2014 13:27:00 -0500

> I'm unsure how best to handle this mess.  Maybe avoid selecting the
> new frame in server-create-tty-frame, if a TTY menu is currently being
> displayed?

Whatever we do, we should do it whether or not a tty menu is displayed.
Switching frame inside a process filter is nasty but allowed.  So:
- server.el should probably only change the selected frame temporarily and
  revert it before returning from the process filter.
- tty menus need to make sure they don't crash if a process filter
  changes the selected frame.  But I think it's OK if they behave a bit
  strangely in that case.  IIUC with your recent change it doesn't crash
  any more, so it might be good enough on this side.

        Stefan