aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-09-26 10:37:16 +0300
committerEli Zaretskii2013-09-26 10:37:16 +0300
commitb87c4ff2817e71ca71b028792200b1e069a95e04 (patch)
treebfe00c0655fa02078a9ab2c633ea06d90c4a2064 /src/xmenu.c
parentbbc108377873aa6ed7cf21c731770103096eea39 (diff)
parentba355de014b75ed104da4777f909db70d62f2357 (diff)
downloademacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz
emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.zip
Merge from trunk.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 5d1f44e0f5a..054a52e7760 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -498,7 +498,7 @@ If FRAME is nil or not given, use the selected frame. */)
498 memset (&ev, 0, sizeof ev); 498 memset (&ev, 0, sizeof ev);
499 ev.xbutton.display = FRAME_X_DISPLAY (f); 499 ev.xbutton.display = FRAME_X_DISPLAY (f);
500 ev.xbutton.window = XtWindow (menubar); 500 ev.xbutton.window = XtWindow (menubar);
501 ev.xbutton.root = FRAME_X_DISPLAY_INFO (f)->root_window; 501 ev.xbutton.root = FRAME_DISPLAY_INFO (f)->root_window;
502 ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f)); 502 ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
503 ev.xbutton.button = Button1; 503 ev.xbutton.button = Button1;
504 ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2; 504 ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2;
@@ -990,7 +990,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
990 990
991 /* Save the frame's previous menu bar contents data. */ 991 /* Save the frame's previous menu bar contents data. */
992 if (previous_menu_items_used) 992 if (previous_menu_items_used)
993 memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents, 993 memcpy (previous_items, XVECTOR (f->menu_bar_vector)->u.contents,
994 previous_menu_items_used * word_size); 994 previous_menu_items_used * word_size);
995 995
996 /* Fill in menu_items with the current menu bar contents. 996 /* Fill in menu_items with the current menu bar contents.
@@ -1367,7 +1367,7 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
1367{ 1367{
1368 struct next_popup_x_y *data = user_data; 1368 struct next_popup_x_y *data = user_data;
1369 GtkRequisition req; 1369 GtkRequisition req;
1370 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f); 1370 struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (data->f);
1371 int disp_width = x_display_pixel_width (dpyinfo); 1371 int disp_width = x_display_pixel_width (dpyinfo);
1372 int disp_height = x_display_pixel_height (dpyinfo); 1372 int disp_height = x_display_pixel_height (dpyinfo);
1373 1373
@@ -1449,7 +1449,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int
1449 if (for_click) 1449 if (for_click)
1450 { 1450 {
1451 for (i = 0; i < 5; i++) 1451 for (i = 0; i < 5; i++)
1452 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) 1452 if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
1453 break; 1453 break;
1454 } 1454 }
1455 1455
@@ -1474,7 +1474,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int
1474 1474
1475 /* Must reset this manually because the button release event is not passed 1475 /* Must reset this manually because the button release event is not passed
1476 to Emacs event loop. */ 1476 to Emacs event loop. */
1477 FRAME_X_DISPLAY_INFO (f)->grabbed = 0; 1477 FRAME_DISPLAY_INFO (f)->grabbed = 0;
1478} 1478}
1479 1479
1480#else /* not USE_GTK */ 1480#else /* not USE_GTK */
@@ -1543,7 +1543,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
1543 event->send_event = 0; 1543 event->send_event = 0;
1544 event->display = FRAME_X_DISPLAY (f); 1544 event->display = FRAME_X_DISPLAY (f);
1545 event->time = CurrentTime; 1545 event->time = CurrentTime;
1546 event->root = FRAME_X_DISPLAY_INFO (f)->root_window; 1546 event->root = FRAME_DISPLAY_INFO (f)->root_window;
1547 event->window = event->subwindow = event->root; 1547 event->window = event->subwindow = event->root;
1548 event->x = x; 1548 event->x = x;
1549 event->y = y; 1549 event->y = y;
@@ -1558,7 +1558,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
1558 event->state = 0; 1558 event->state = 0;
1559 event->button = 0; 1559 event->button = 0;
1560 for (i = 0; i < 5; i++) 1560 for (i = 0; i < 5; i++)
1561 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) 1561 if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
1562 event->button = i; 1562 event->button = i;
1563 1563
1564 /* Don't allow any geometry request from the user. */ 1564 /* Don't allow any geometry request from the user. */
@@ -1578,7 +1578,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
1578 make_number (menu_id & ~(-1 << (fact))))); 1578 make_number (menu_id & ~(-1 << (fact)))));
1579 1579
1580 /* Process events that apply to the menu. */ 1580 /* Process events that apply to the menu. */
1581 popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1); 1581 popup_get_selection (0, FRAME_DISPLAY_INFO (f), menu_id, 1);
1582 1582
1583 unbind_to (specpdl_count, Qnil); 1583 unbind_to (specpdl_count, Qnil);
1584 } 1584 }
@@ -1969,7 +1969,7 @@ create_and_show_dialog (struct frame *f, widget_value *first_wv)
1969 Fcons (make_number (dialog_id >> (fact)), 1969 Fcons (make_number (dialog_id >> (fact)),
1970 make_number (dialog_id & ~(-1 << (fact))))); 1970 make_number (dialog_id & ~(-1 << (fact)))));
1971 1971
1972 popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); 1972 popup_get_selection (0, FRAME_DISPLAY_INFO (f), dialog_id, 1);
1973 1973
1974 unbind_to (count, Qnil); 1974 unbind_to (count, Qnil);
1975 } 1975 }
@@ -2194,7 +2194,7 @@ menu_help_callback (char const *help_string, int pane, int item)
2194 Lisp_Object pane_name; 2194 Lisp_Object pane_name;
2195 Lisp_Object menu_object; 2195 Lisp_Object menu_object;
2196 2196
2197 first_item = XVECTOR (menu_items)->contents; 2197 first_item = XVECTOR (menu_items)->u.contents;
2198 if (EQ (first_item[0], Qt)) 2198 if (EQ (first_item[0], Qt))
2199 pane_name = first_item[MENU_ITEMS_PANE_NAME]; 2199 pane_name = first_item[MENU_ITEMS_PANE_NAME];
2200 else if (EQ (first_item[0], Qquote)) 2200 else if (EQ (first_item[0], Qquote))
@@ -2225,13 +2225,13 @@ pop_down_menu (Lisp_Object arg)
2225#ifdef HAVE_X_WINDOWS 2225#ifdef HAVE_X_WINDOWS
2226 /* Assume the mouse has moved out of the X window. 2226 /* Assume the mouse has moved out of the X window.
2227 If it has actually moved in, we will get an EnterNotify. */ 2227 If it has actually moved in, we will get an EnterNotify. */
2228 x_mouse_leave (FRAME_X_DISPLAY_INFO (f)); 2228 x_mouse_leave (FRAME_DISPLAY_INFO (f));
2229 2229
2230 /* State that no mouse buttons are now held. 2230 /* State that no mouse buttons are now held.
2231 (The oldXMenu code doesn't track this info for us.) 2231 (The oldXMenu code doesn't track this info for us.)
2232 That is not necessarily true, but the fiction leads to reasonable 2232 That is not necessarily true, but the fiction leads to reasonable
2233 results, and it is a pain to ask which are actually held now. */ 2233 results, and it is a pain to ask which are actually held now. */
2234 FRAME_X_DISPLAY_INFO (f)->grabbed = 0; 2234 FRAME_DISPLAY_INFO (f)->grabbed = 0;
2235 2235
2236#endif /* HAVE_X_WINDOWS */ 2236#endif /* HAVE_X_WINDOWS */
2237 2237