summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-03-18 08:37:56 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2009-03-18 08:37:56 +0000
commit5da9fdfa169d86a46377ef4af91a612abbf39e37 (patch)
treed1c6121be01a59cae7e0e7722496f5875118460e /src/xmenu.c
parent37e3a2bff8dd9dd8046fd4620d3c9d0344954756 (diff)
downloademacs-5da9fdfa169d86a46377ef4af91a612abbf39e37.tar.gz
(xdialog_show): Move Fredisplay call ...
(Fx_popup_dialog): ... here.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 6767c1b38f8..c6d7b0d9585 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -604,6 +604,17 @@ for instance using the window manager, then this produces a quit and
if (! FRAME_X_P (f) && ! FRAME_MSDOS_P (f))
error ("Can not put X dialog on this terminal");
+ /* 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
+ is not done when a dialog is shown. If redisplay could be done in the
+ X event loop (i.e. the X event loop does not run in a signal handler)
+ this would not be needed.
+
+ Do this before creating the widget value that points to Lisp
+ string contents, because Fredisplay may GC and relocate them. */
+ Fredisplay (Qt);
+
#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
/* Display a menu with these alternatives
in the middle of frame F. */
@@ -2448,14 +2459,6 @@ xdialog_show (f, keymaps, title, header, error_name)
/* No selection has been chosen yet. */
menu_item_selection = 0;
- /* 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
- is not done when a dialog is shown. If redisplay could be done in the
- X event loop (i.e. the X event loop does not run in a signal handler)
- this would not be needed. */
- Fredisplay (Qt);
-
/* Actually create and show the dialog. */
create_and_show_dialog (f, first_wv);