aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xmenu.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 5258888dd4d..acfb48e2fec 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -885,12 +885,14 @@ free_menubar_widget_value_tree (wv)
885 UNBLOCK_INPUT; 885 UNBLOCK_INPUT;
886} 886}
887 887
888extern void EmacsFrameSetCharSize ();
889
888static void 890static void
889update_one_frame_psheets (f) 891update_one_frame_psheets (f)
890 FRAME_PTR f; 892 FRAME_PTR f;
891{ 893{
892 struct x_display *x = f->display.x; 894 struct x_display *x = f->display.x;
893 895 int columns, rows;
894 int menubar_changed; 896 int menubar_changed;
895 897
896 menubar_changed = (x->menubar_widget 898 menubar_changed = (x->menubar_widget
@@ -900,6 +902,12 @@ update_one_frame_psheets (f)
900 return; 902 return;
901 903
902 BLOCK_INPUT; 904 BLOCK_INPUT;
905 /* Save the size of the frame because the pane widget doesn't accept to
906 resize itself. So force it. */
907 columns = f->width;
908 rows = f->height;
909
910
903 XawPanedSetRefigureMode (x->column_widget, 0); 911 XawPanedSetRefigureMode (x->column_widget, 0);
904 912
905 /* the order in which children are managed is the top to 913 /* the order in which children are managed is the top to
@@ -924,6 +932,10 @@ update_one_frame_psheets (f)
924 932
925 /* and now thrash the sizes */ 933 /* and now thrash the sizes */
926 XawPanedSetRefigureMode (x->column_widget, 1); 934 XawPanedSetRefigureMode (x->column_widget, 1);
935
936 /* Force the pane widget to resize itself with the right values. */
937 EmacsFrameSetCharSize (x->edit_widget, columns, rows);
938
927 UNBLOCK_INPUT; 939 UNBLOCK_INPUT;
928} 940}
929 941
@@ -1284,6 +1296,9 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1284 pop_up_menu (mw, &dummy); 1296 pop_up_menu (mw, &dummy);
1285 } 1297 }
1286 1298
1299 /* No need to check a second time since this is done in the XEvent loop.
1300 This slows done the execution. */
1301#if 0
1287 /* Check again whether the mouse has moved to another menu bar item. */ 1302 /* Check again whether the mouse has moved to another menu bar item. */
1288 if (check_mouse_other_menu_bar (f)) 1303 if (check_mouse_other_menu_bar (f))
1289 { 1304 {
@@ -1297,6 +1312,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1297 lw_destroy_all_widgets (menu_id); 1312 lw_destroy_all_widgets (menu_id);
1298 goto pop_down; 1313 goto pop_down;
1299 } 1314 }
1315#endif
1300 1316
1301 /* Process events that apply to the menu. */ 1317 /* Process events that apply to the menu. */
1302 while (1) 1318 while (1)