comparison src/xmenu.c @ 90147:e1fbb019c538

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-39 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 258-271) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 66) - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 21 Apr 2005 05:59:53 +0000
parents 4da4a09e8b1b 8449711f0c1c
children 08185296b491
comparison
equal deleted inserted replaced
90146:a4445dd2a017 90147:e1fbb019c538
769 Lisp_Object position, menu; 769 Lisp_Object position, menu;
770 { 770 {
771 Lisp_Object keymap, tem; 771 Lisp_Object keymap, tem;
772 int xpos = 0, ypos = 0; 772 int xpos = 0, ypos = 0;
773 Lisp_Object title; 773 Lisp_Object title;
774 char *error_name; 774 char *error_name = NULL;
775 Lisp_Object selection; 775 Lisp_Object selection;
776 FRAME_PTR f = NULL; 776 FRAME_PTR f = NULL;
777 Lisp_Object x, y, window; 777 Lisp_Object x, y, window;
778 int keymaps = 0; 778 int keymaps = 0;
779 int for_click = 0; 779 int for_click = 0;
2481 { 2481 {
2482 for (i = 0; i < 5; i++) 2482 for (i = 0; i < 5; i++)
2483 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) 2483 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
2484 break; 2484 break;
2485 } 2485 }
2486 2486
2487 /* Display the menu. */ 2487 /* Display the menu. */
2488 gtk_widget_show_all (menu); 2488 gtk_widget_show_all (menu);
2489 gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0); 2489 gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
2490 2490
2491 record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); 2491 record_unwind_protect (pop_down_menu, make_save_value (menu, 0));
2599 XtSetValues (menu, av, ac); 2599 XtSetValues (menu, av, ac);
2600 2600
2601 /* Display the menu. */ 2601 /* Display the menu. */
2602 lw_popup_menu (menu, (XEvent *) &dummy); 2602 lw_popup_menu (menu, (XEvent *) &dummy);
2603 popup_activated_flag = 1; 2603 popup_activated_flag = 1;
2604 2604
2605 { 2605 {
2606 int fact = 4 * sizeof (LWLIB_ID); 2606 int fact = 4 * sizeof (LWLIB_ID);
2607 int specpdl_count = SPECPDL_INDEX (); 2607 int specpdl_count = SPECPDL_INDEX ();
2608 record_unwind_protect (pop_down_menu, 2608 record_unwind_protect (pop_down_menu,
2609 Fcons (make_number (menu_id >> (fact)), 2609 Fcons (make_number (menu_id >> (fact)),
3223 pop_down_menu (arg) 3223 pop_down_menu (arg)
3224 Lisp_Object arg; 3224 Lisp_Object arg;
3225 { 3225 {
3226 struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg)); 3226 struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
3227 struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg)); 3227 struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
3228 3228
3229 FRAME_PTR f = p1->pointer; 3229 FRAME_PTR f = p1->pointer;
3230 XMenu *menu = p2->pointer; 3230 XMenu *menu = p2->pointer;
3231 3231
3232 BLOCK_INPUT; 3232 BLOCK_INPUT;
3233 #ifndef MSDOS 3233 #ifndef MSDOS
3457 pane = selidx = 0; 3457 pane = selidx = 0;
3458 3458
3459 #ifndef MSDOS 3459 #ifndef MSDOS
3460 XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f)); 3460 XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f));
3461 #endif 3461 #endif
3462 3462
3463 record_unwind_protect (pop_down_menu, 3463 record_unwind_protect (pop_down_menu,
3464 Fcons (make_save_value (f, 0), 3464 Fcons (make_save_value (f, 0),
3465 make_save_value (menu, 0))); 3465 make_save_value (menu, 0)));
3466 3466
3467 /* Help display under X won't work because XMenuActivate contains 3467 /* Help display under X won't work because XMenuActivate contains