aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-05 13:07:44 +0000
committerGerd Moellmann2001-04-05 13:07:44 +0000
commitae5564222b7ce27ea8d9a9d83e2c1ce86f90a943 (patch)
tree4d95366e4c201d9c791dc970fbf9d9487807ca25 /src
parentfc2cdd9a0fa5a7ee9c02d4e83459878568d07030 (diff)
downloademacs-ae5564222b7ce27ea8d9a9d83e2c1ce86f90a943.tar.gz
emacs-ae5564222b7ce27ea8d9a9d83e2c1ce86f90a943.zip
(free_frame_menubar) [USE_MOTIF]: Preserve the
shell widget's position only if it is non-null.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 99f5c46a959..b4a1a87d4d9 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1885,16 +1885,20 @@ free_frame_menubar (f)
1885 BLOCK_INPUT; 1885 BLOCK_INPUT;
1886 1886
1887#ifdef USE_MOTIF 1887#ifdef USE_MOTIF
1888 XtVaGetValues (f->output_data.x->widget, XtNx, &x0, XtNy, &y0, NULL); 1888 if (f->output_data.x->widget)
1889 XtVaGetValues (f->output_data.x->widget, XtNx, &x0, XtNy, &y0, NULL);
1889#endif 1890#endif
1890 1891
1891 lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id); 1892 lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id);
1892 f->output_data.x->menubar_widget = NULL; 1893 f->output_data.x->menubar_widget = NULL;
1893 1894
1894#ifdef USE_MOTIF 1895#ifdef USE_MOTIF
1895 XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL); 1896 if (f->output_data.x->widget)
1896 if (x1 == 0 && y1 == 0) 1897 {
1897 XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL); 1898 XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL);
1899 if (x1 == 0 && y1 == 0)
1900 XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
1901 }
1898#endif 1902#endif
1899 1903
1900 UNBLOCK_INPUT; 1904 UNBLOCK_INPUT;