aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-01-30 15:59:13 +0100
committerStefan Kangas2021-01-30 15:59:13 +0100
commit3555657585bb2c1809fa6abff7f565a8c7f226eb (patch)
treed09e3782c549b2f97bf46e4d9a05cc49f733f31c
parent96f20120c97a0a329fff81a0cc3747082a8a2c55 (diff)
downloademacs-3555657585bb2c1809fa6abff7f565a8c7f226eb.tar.gz
emacs-3555657585bb2c1809fa6abff7f565a8c7f226eb.zip
Remove unused argument from set_frame_menubar (Bug#45759)
* src/w32menu.c (set_frame_menubar): * src/xmenu.c (set_frame_menubar): Remove unused argument. All callers updated.
-rw-r--r--src/frame.h2
-rw-r--r--src/w32fns.c2
-rw-r--r--src/w32menu.c10
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xmenu.c14
5 files changed, 13 insertions, 17 deletions
diff --git a/src/frame.h b/src/frame.h
index 9b0852c7b9c..21148fe94c9 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1707,7 +1707,7 @@ extern Lisp_Object gui_display_get_resource (Display_Info *,
1707 Lisp_Object component, 1707 Lisp_Object component,
1708 Lisp_Object subclass); 1708 Lisp_Object subclass);
1709 1709
1710extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p); 1710extern void set_frame_menubar (struct frame *f, bool deep_p);
1711extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); 1711extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
1712extern void free_frame_menubar (struct frame *); 1712extern void free_frame_menubar (struct frame *);
1713extern bool frame_ancestor_p (struct frame *af, struct frame *df); 1713extern bool frame_ancestor_p (struct frame *af, struct frame *df);
diff --git a/src/w32fns.c b/src/w32fns.c
index e93a0b85d93..5704f1d3c33 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1637,7 +1637,7 @@ w32_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1637 if (!old) 1637 if (!old)
1638 /* Make menu bar when there was none. Emacs 25 waited until 1638 /* Make menu bar when there was none. Emacs 25 waited until
1639 the next redisplay for this to take effect. */ 1639 the next redisplay for this to take effect. */
1640 set_frame_menubar (f, false, true); 1640 set_frame_menubar (f, true);
1641 else 1641 else
1642 { 1642 {
1643 /* Remove menu bar. */ 1643 /* Remove menu bar. */
diff --git a/src/w32menu.c b/src/w32menu.c
index 8bf0c462030..3bf76663947 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -155,7 +155,7 @@ w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
155void 155void
156w32_activate_menubar (struct frame *f) 156w32_activate_menubar (struct frame *f)
157{ 157{
158 set_frame_menubar (f, false, true); 158 set_frame_menubar (f, true);
159 159
160 /* Lock out further menubar changes while active. */ 160 /* Lock out further menubar changes while active. */
161 f->output_data.w32->menubar_active = 1; 161 f->output_data.w32->menubar_active = 1;
@@ -258,12 +258,10 @@ menubar_selection_callback (struct frame *f, void * client_data)
258} 258}
259 259
260 260
261/* Set the contents of the menubar widgets of frame F. 261/* Set the contents of the menubar widgets of frame F. */
262 The argument FIRST_TIME is currently ignored;
263 it is set the first time this is called, from initialize_frame_menubar. */
264 262
265void 263void
266set_frame_menubar (struct frame *f, bool first_time, bool deep_p) 264set_frame_menubar (struct frame *f, bool deep_p)
267{ 265{
268 HMENU menubar_widget = f->output_data.w32->menubar_widget; 266 HMENU menubar_widget = f->output_data.w32->menubar_widget;
269 Lisp_Object items; 267 Lisp_Object items;
@@ -511,7 +509,7 @@ initialize_frame_menubar (struct frame *f)
511 /* This function is called before the first chance to redisplay 509 /* This function is called before the first chance to redisplay
512 the frame. It has to be, so the frame will have the right size. */ 510 the frame. It has to be, so the frame will have the right size. */
513 fset_menu_bar_items (f, menu_bar_items (FRAME_MENU_BAR_ITEMS (f))); 511 fset_menu_bar_items (f, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
514 set_frame_menubar (f, true, true); 512 set_frame_menubar (f, true);
515} 513}
516 514
517/* Get rid of the menu bar of frame F, and free its storage. 515/* Get rid of the menu bar of frame F, and free its storage.
diff --git a/src/xdisp.c b/src/xdisp.c
index 11b9e1becfd..32b359098aa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12876,7 +12876,7 @@ update_menu_bar (struct frame *f, bool save_match_data, bool hooks_run)
12876 the selected frame should be allowed to set it. */ 12876 the selected frame should be allowed to set it. */
12877 if (f == SELECTED_FRAME ()) 12877 if (f == SELECTED_FRAME ())
12878#endif 12878#endif
12879 set_frame_menubar (f, false, false); 12879 set_frame_menubar (f, false);
12880 } 12880 }
12881 else 12881 else
12882 /* On a terminal screen, the menu bar is an ordinary screen 12882 /* On a terminal screen, the menu bar is an ordinary screen
diff --git a/src/xmenu.c b/src/xmenu.c
index ea3813a64e2..a83fffbf1ce 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -289,7 +289,7 @@ DEFUN ("x-menu-bar-open-internal", Fx_menu_bar_open_internal, Sx_menu_bar_open_i
289 block_input (); 289 block_input ();
290 290
291 if (FRAME_EXTERNAL_MENU_BAR (f)) 291 if (FRAME_EXTERNAL_MENU_BAR (f))
292 set_frame_menubar (f, false, true); 292 set_frame_menubar (f, true);
293 293
294 menubar = FRAME_X_OUTPUT (f)->menubar_widget; 294 menubar = FRAME_X_OUTPUT (f)->menubar_widget;
295 if (menubar) 295 if (menubar)
@@ -368,7 +368,7 @@ If FRAME is nil or not given, use the selected frame. */)
368 f = decode_window_system_frame (frame); 368 f = decode_window_system_frame (frame);
369 369
370 if (FRAME_EXTERNAL_MENU_BAR (f)) 370 if (FRAME_EXTERNAL_MENU_BAR (f))
371 set_frame_menubar (f, false, true); 371 set_frame_menubar (f, true);
372 372
373 menubar = FRAME_X_OUTPUT (f)->menubar_widget; 373 menubar = FRAME_X_OUTPUT (f)->menubar_widget;
374 if (menubar) 374 if (menubar)
@@ -433,7 +433,7 @@ x_activate_menubar (struct frame *f)
433 return; 433 return;
434#endif 434#endif
435 435
436 set_frame_menubar (f, false, true); 436 set_frame_menubar (f, true);
437 block_input (); 437 block_input ();
438 popup_activated_flag = 1; 438 popup_activated_flag = 1;
439#ifdef USE_GTK 439#ifdef USE_GTK
@@ -677,12 +677,10 @@ apply_systemfont_to_menu (struct frame *f, Widget w)
677 677
678#endif 678#endif
679 679
680/* Set the contents of the menubar widgets of frame F. 680/* Set the contents of the menubar widgets of frame F. */
681 The argument FIRST_TIME is currently ignored;
682 it is set the first time this is called, from initialize_frame_menubar. */
683 681
684void 682void
685set_frame_menubar (struct frame *f, bool first_time, bool deep_p) 683set_frame_menubar (struct frame *f, bool deep_p)
686{ 684{
687 xt_or_gtk_widget menubar_widget, old_widget; 685 xt_or_gtk_widget menubar_widget, old_widget;
688#ifdef USE_X_TOOLKIT 686#ifdef USE_X_TOOLKIT
@@ -1029,7 +1027,7 @@ initialize_frame_menubar (struct frame *f)
1029 /* This function is called before the first chance to redisplay 1027 /* This function is called before the first chance to redisplay
1030 the frame. It has to be, so the frame will have the right size. */ 1028 the frame. It has to be, so the frame will have the right size. */
1031 fset_menu_bar_items (f, menu_bar_items (FRAME_MENU_BAR_ITEMS (f))); 1029 fset_menu_bar_items (f, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
1032 set_frame_menubar (f, true, true); 1030 set_frame_menubar (f, true);
1033} 1031}
1034 1032
1035 1033