Mercurial > emacs
comparison src/xmenu.c @ 6200:01c57ae8ca57
(update_one_frame_psheets): Call EmacsFrameSetCharSize to
force the paned widget to resize to the right value.
(xmenu_show): No need to check a second time whether the mouse has
moved to another menu bar item. This slows down execution.
author | Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr> |
---|---|
date | Fri, 04 Mar 1994 09:30:58 +0000 |
parents | d941186e8fb9 |
children | 38ec8e76594f |
comparison
equal
deleted
inserted
replaced
6199:044dcf8b9066 | 6200:01c57ae8ca57 |
---|---|
883 BLOCK_INPUT; | 883 BLOCK_INPUT; |
884 free_widget_value (wv); | 884 free_widget_value (wv); |
885 UNBLOCK_INPUT; | 885 UNBLOCK_INPUT; |
886 } | 886 } |
887 | 887 |
888 extern void EmacsFrameSetCharSize (); | |
889 | |
888 static void | 890 static void |
889 update_one_frame_psheets (f) | 891 update_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 |
897 && !XtIsManaged (x->menubar_widget)); | 899 && !XtIsManaged (x->menubar_widget)); |
898 | 900 |
899 if (! (menubar_changed)) | 901 if (! (menubar_changed)) |
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 |
906 bottom order in which they are displayed in the paned window. | 914 bottom order in which they are displayed in the paned window. |
907 First, remove the text-area widget. | 915 First, remove the text-area widget. |
922 /* Re-manage the text-area widget */ | 930 /* Re-manage the text-area widget */ |
923 XtManageChild (x->edit_widget); | 931 XtManageChild (x->edit_widget); |
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 |
930 void | 942 void |
931 set_frame_menubar (f) | 943 set_frame_menubar (f) |
1282 | 1294 |
1283 /* We activate directly the lucid implementation. */ | 1295 /* We activate directly the lucid implementation. */ |
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 { |
1290 /* The mouse moved into a different menu bar item. | 1305 /* The mouse moved into a different menu bar item. |
1291 We should bring up that item's menu instead. | 1306 We should bring up that item's menu instead. |
1295 ((CompositeWidget)menu)->composite.children[0]), | 1310 ((CompositeWidget)menu)->composite.children[0]), |
1296 CurrentTime); | 1311 CurrentTime); |
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) |
1303 { | 1319 { |
1304 XEvent event; | 1320 XEvent event; |