]> code.delx.au - gnu-emacs/commitdiff
* menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 1 Jul 2014 08:07:32 +0000 (12:07 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 1 Jul 2014 08:07:32 +0000 (12:07 +0400)
caused by xw_popup_dialog in daemon mode (Bug#17891).

src/ChangeLog
src/menu.c

index a94bf5dbb4689531eba25a27371f5292acc60fcb..e733c2820ab2a0c5f75f5aafdb4063faa75ef83d 100644 (file)
@@ -1,6 +1,8 @@
 2014-07-01  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * xfaces.c (init_frame_faces): Always realize basic faces (#Bug17889).
+       * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
+       caused by xw_popup_dialog in daemon mode (Bug#17891).
 
 2014-06-30  Eli Zaretskii  <eliz@gnu.org>
 
index 468f2814eb431d9e364a227bf4b9b33f62ecc70e..654be0db9c7cbbdbe9f98ae9100f8016f06e2616 100644 (file)
@@ -1554,6 +1554,11 @@ for instance using the window manager, then this produces a quit and
        but I don't want to make one now.  */
     CHECK_WINDOW (window);
 
+  /* Note that xw_popup_dialog can call menu code, so
+     Vmenu_updating_frame should be set (Bug#17891).  */
+  eassert (f && FRAME_LIVE_P (f));
+  XSETFRAME (Vmenu_updating_frame, f);
+
   /* Force a redisplay before showing the dialog.  If a frame is created
      just before showing the dialog, its contents may not have been fully
      drawn, as this depends on timing of events from the X server.  Redisplay