aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index d03a4bc974b..06d6cb055c0 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -165,7 +165,7 @@ mouse_position_for_popup (FRAME_PTR f, int *x, int *y)
165 if (! FRAME_X_P (f)) 165 if (! FRAME_X_P (f))
166 emacs_abort (); 166 emacs_abort ();
167 167
168 BLOCK_INPUT; 168 block_input ();
169 169
170 XQueryPointer (FRAME_X_DISPLAY (f), 170 XQueryPointer (FRAME_X_DISPLAY (f),
171 DefaultRootWindow (FRAME_X_DISPLAY (f)), 171 DefaultRootWindow (FRAME_X_DISPLAY (f)),
@@ -186,7 +186,7 @@ mouse_position_for_popup (FRAME_PTR f, int *x, int *y)
186 we don't care. */ 186 we don't care. */
187 (unsigned int *) &dummy); 187 (unsigned int *) &dummy);
188 188
189 UNBLOCK_INPUT; 189 unblock_input ();
190 190
191 /* xmenu_show expects window coordinates, not root window 191 /* xmenu_show expects window coordinates, not root window
192 coordinates. Translate. */ 192 coordinates. Translate. */
@@ -328,9 +328,9 @@ for instance using the window manager, then this produces a quit and
328 list_of_panes (Fcons (contents, Qnil)); 328 list_of_panes (Fcons (contents, Qnil));
329 329
330 /* Display them in a dialog box. */ 330 /* Display them in a dialog box. */
331 BLOCK_INPUT; 331 block_input ();
332 selection = xdialog_show (f, 0, title, header, &error_name); 332 selection = xdialog_show (f, 0, title, header, &error_name);
333 UNBLOCK_INPUT; 333 unblock_input ();
334 334
335 unbind_to (specpdl_count, Qnil); 335 unbind_to (specpdl_count, Qnil);
336 discard_menu_items (); 336 discard_menu_items ();
@@ -490,7 +490,7 @@ If FRAME is nil or not given, use the selected frame. */)
490 XEvent ev; 490 XEvent ev;
491 FRAME_PTR f = check_x_frame (frame); 491 FRAME_PTR f = check_x_frame (frame);
492 Widget menubar; 492 Widget menubar;
493 BLOCK_INPUT; 493 block_input ();
494 494
495 if (FRAME_EXTERNAL_MENU_BAR (f)) 495 if (FRAME_EXTERNAL_MENU_BAR (f))
496 set_frame_menubar (f, 0, 1); 496 set_frame_menubar (f, 0, 1);
@@ -548,7 +548,7 @@ If FRAME is nil or not given, use the selected frame. */)
548 } 548 }
549 } 549 }
550 550
551 UNBLOCK_INPUT; 551 unblock_input ();
552 552
553 return Qnil; 553 return Qnil;
554} 554}
@@ -569,9 +569,9 @@ If FRAME is nil or not given, use the selected frame. */)
569 FRAME_PTR f; 569 FRAME_PTR f;
570 570
571 /* gcc 2.95 doesn't accept the FRAME_PTR declaration after 571 /* gcc 2.95 doesn't accept the FRAME_PTR declaration after
572 BLOCK_INPUT. */ 572 block_input (). */
573 573
574 BLOCK_INPUT; 574 block_input ();
575 f = check_x_frame (frame); 575 f = check_x_frame (frame);
576 576
577 if (FRAME_EXTERNAL_MENU_BAR (f)) 577 if (FRAME_EXTERNAL_MENU_BAR (f))
@@ -590,7 +590,7 @@ If FRAME is nil or not given, use the selected frame. */)
590 g_list_free (children); 590 g_list_free (children);
591 } 591 }
592 } 592 }
593 UNBLOCK_INPUT; 593 unblock_input ();
594 594
595 return Qnil; 595 return Qnil;
596} 596}
@@ -642,7 +642,7 @@ x_activate_menubar (FRAME_PTR f)
642#endif 642#endif
643 643
644 set_frame_menubar (f, 0, 1); 644 set_frame_menubar (f, 0, 1);
645 BLOCK_INPUT; 645 block_input ();
646 popup_activated_flag = 1; 646 popup_activated_flag = 1;
647#ifdef USE_GTK 647#ifdef USE_GTK
648 XPutBackEvent (f->output_data.x->display_info->display, 648 XPutBackEvent (f->output_data.x->display_info->display,
@@ -650,7 +650,7 @@ x_activate_menubar (FRAME_PTR f)
650#else 650#else
651 XtDispatchEvent (f->output_data.x->saved_menu_event); 651 XtDispatchEvent (f->output_data.x->saved_menu_event);
652#endif 652#endif
653 UNBLOCK_INPUT; 653 unblock_input ();
654 654
655 /* Ignore this if we get it a second time. */ 655 /* Ignore this if we get it a second time. */
656 f->output_data.x->saved_menu_event->type = 0; 656 f->output_data.x->saved_menu_event->type = 0;
@@ -803,10 +803,10 @@ menubar_selection_callback (GtkWidget *widget, gpointer client_data)
803 sit-for will exit at once if the focus event follows the menu selection 803 sit-for will exit at once if the focus event follows the menu selection
804 event. */ 804 event. */
805 805
806 BLOCK_INPUT; 806 block_input ();
807 while (gtk_events_pending ()) 807 while (gtk_events_pending ())
808 gtk_main_iteration (); 808 gtk_main_iteration ();
809 UNBLOCK_INPUT; 809 unblock_input ();
810 810
811 find_and_call_menu_selection (cb_data->cl_data->f, 811 find_and_call_menu_selection (cb_data->cl_data->f,
812 cb_data->cl_data->menu_bar_items_used, 812 cb_data->cl_data->menu_bar_items_used,
@@ -853,7 +853,7 @@ update_frame_menubar (FRAME_PTR f)
853 if (!x->menubar_widget || XtIsManaged (x->menubar_widget)) 853 if (!x->menubar_widget || XtIsManaged (x->menubar_widget))
854 return 0; 854 return 0;
855 855
856 BLOCK_INPUT; 856 block_input ();
857 /* Save the size of the frame because the pane widget doesn't accept 857 /* Save the size of the frame because the pane widget doesn't accept
858 to resize itself. So force it. */ 858 to resize itself. So force it. */
859 columns = FRAME_COLS (f); 859 columns = FRAME_COLS (f);
@@ -880,7 +880,7 @@ update_frame_menubar (FRAME_PTR f)
880 880
881 /* Force the pane widget to resize itself with the right values. */ 881 /* Force the pane widget to resize itself with the right values. */
882 EmacsFrameSetCharSize (x->edit_widget, columns, rows); 882 EmacsFrameSetCharSize (x->edit_widget, columns, rows);
883 UNBLOCK_INPUT; 883 unblock_input ();
884#endif 884#endif
885 return 1; 885 return 1;
886} 886}
@@ -1164,7 +1164,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1164 1164
1165 /* Create or update the menu bar widget. */ 1165 /* Create or update the menu bar widget. */
1166 1166
1167 BLOCK_INPUT; 1167 block_input ();
1168 1168
1169#ifdef USE_GTK 1169#ifdef USE_GTK
1170 xg_crazy_callback_abort = 1; 1170 xg_crazy_callback_abort = 1;
@@ -1264,7 +1264,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1264 xg_crazy_callback_abort = 0; 1264 xg_crazy_callback_abort = 0;
1265#endif 1265#endif
1266 1266
1267 UNBLOCK_INPUT; 1267 unblock_input ();
1268} 1268}
1269 1269
1270/* Called from Fx_create_frame to create the initial menubar of a frame 1270/* Called from Fx_create_frame to create the initial menubar of a frame
@@ -1313,7 +1313,7 @@ free_frame_menubar (FRAME_PTR f)
1313 Position x0, y0, x1, y1; 1313 Position x0, y0, x1, y1;
1314#endif 1314#endif
1315 1315
1316 BLOCK_INPUT; 1316 block_input ();
1317 1317
1318#ifdef USE_MOTIF 1318#ifdef USE_MOTIF
1319 if (f->output_data.x->widget) 1319 if (f->output_data.x->widget)
@@ -1332,7 +1332,7 @@ free_frame_menubar (FRAME_PTR f)
1332#endif 1332#endif
1333 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); 1333 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
1334 } 1334 }
1335 UNBLOCK_INPUT; 1335 unblock_input ();
1336 } 1336 }
1337} 1337}
1338#endif /* not USE_GTK */ 1338#endif /* not USE_GTK */
@@ -1417,9 +1417,9 @@ pop_down_menu (Lisp_Object arg)
1417 struct Lisp_Save_Value *p = XSAVE_VALUE (arg); 1417 struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
1418 1418
1419 popup_activated_flag = 0; 1419 popup_activated_flag = 0;
1420 BLOCK_INPUT; 1420 block_input ();
1421 gtk_widget_destroy (GTK_WIDGET (p->pointer)); 1421 gtk_widget_destroy (GTK_WIDGET (p->pointer));
1422 UNBLOCK_INPUT; 1422 unblock_input ();
1423 return Qnil; 1423 return Qnil;
1424} 1424}
1425 1425
@@ -1527,9 +1527,9 @@ pop_down_menu (Lisp_Object arg)
1527 LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID) 1527 LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID)
1528 | XINT (XCDR (arg))); 1528 | XINT (XCDR (arg)));
1529 1529
1530 BLOCK_INPUT; 1530 block_input ();
1531 lw_destroy_all_widgets (id); 1531 lw_destroy_all_widgets (id);
1532 UNBLOCK_INPUT; 1532 unblock_input ();
1533 popup_activated_flag = 0; 1533 popup_activated_flag = 0;
1534 1534
1535 return Qnil; 1535 return Qnil;
@@ -1955,9 +1955,9 @@ dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
1955 if ((intptr_t) client_data != -1) 1955 if ((intptr_t) client_data != -1)
1956 menu_item_selection = (Lisp_Object *) client_data; 1956 menu_item_selection = (Lisp_Object *) client_data;
1957 1957
1958 BLOCK_INPUT; 1958 block_input ();
1959 lw_destroy_all_widgets (id); 1959 lw_destroy_all_widgets (id);
1960 UNBLOCK_INPUT; 1960 unblock_input ();
1961 popup_activated_flag = 0; 1961 popup_activated_flag = 0;
1962} 1962}
1963 1963
@@ -2251,7 +2251,7 @@ pop_down_menu (Lisp_Object arg)
2251 FRAME_PTR f = p1->pointer; 2251 FRAME_PTR f = p1->pointer;
2252 XMenu *menu = p2->pointer; 2252 XMenu *menu = p2->pointer;
2253 2253
2254 BLOCK_INPUT; 2254 block_input ();
2255#ifndef MSDOS 2255#ifndef MSDOS
2256 XUngrabPointer (FRAME_X_DISPLAY (f), CurrentTime); 2256 XUngrabPointer (FRAME_X_DISPLAY (f), CurrentTime);
2257 XUngrabKeyboard (FRAME_X_DISPLAY (f), CurrentTime); 2257 XUngrabKeyboard (FRAME_X_DISPLAY (f), CurrentTime);
@@ -2271,7 +2271,7 @@ pop_down_menu (Lisp_Object arg)
2271 2271
2272#endif /* HAVE_X_WINDOWS */ 2272#endif /* HAVE_X_WINDOWS */
2273 2273
2274 UNBLOCK_INPUT; 2274 unblock_input ();
2275 2275
2276 return Qnil; 2276 return Qnil;
2277} 2277}