X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/34d203ef47b9c1064d34b939d6c29ef9e257815d..72af86bd8cf1812d1fcc8924c4093d692040a664:/src/nsmenu.m diff --git a/src/nsmenu.m b/src/nsmenu.m index f85ebc165a..5c9ce2a6d2 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -219,8 +219,8 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) /* Save the frame's previous menu bar contents data */ if (previous_menu_items_used) - bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, - previous_menu_items_used * sizeof (Lisp_Object)); + memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents, + previous_menu_items_used * sizeof (Lisp_Object)); /* parse stage 1: extract from lisp */ save_menu_items (); @@ -999,7 +999,10 @@ free_frame_tool_bar (FRAME_PTR f) Under NS we just hide the toolbar until it might be needed again. -------------------------------------------------------------------------- */ { + BLOCK_INPUT; [[FRAME_NS_VIEW (f) toolbar] setVisible: NO]; + FRAME_TOOLBAR_HEIGHT (f) = 0; + UNBLOCK_INPUT; } void @@ -1009,8 +1012,11 @@ update_frame_tool_bar (FRAME_PTR f) -------------------------------------------------------------------------- */ { int i; - EmacsToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar]; + EmacsView *view = FRAME_NS_VIEW (f); + NSWindow *window = [view window]; + EmacsToolbar *toolbar = [view toolbar]; + BLOCK_INPUT; [toolbar clearActive]; /* update EmacsToolbar as in GtkUtils, build items list */ @@ -1094,6 +1100,10 @@ update_frame_tool_bar (FRAME_PTR f) [newDict release]; } + FRAME_TOOLBAR_HEIGHT (f) = + NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)]) + - FRAME_NS_TITLEBAR_HEIGHT (f); + UNBLOCK_INPUT; }