Commit b8c9a4e3 authored by Jan D's avatar Jan D
Browse files

Fix getting frame size wrong when restoring desktop.

* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
call updateFrameSize.
parent 836c444d
2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
call updateFrameSize.
* nsterm.m (setFrame:): Remove call to display (Bug#18757).
2014-11-14 Jan Djärv <jan.h.d@swipnet.se>
......
......@@ -1072,10 +1072,13 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
EmacsView *view = FRAME_NS_VIEW (f);
NSWindow *window = [view window];
EmacsToolbar *toolbar = [view toolbar];
int oldh;
if (view == nil || toolbar == nil) return;
block_input ();
oldh = FRAME_TOOLBAR_HEIGHT (f);
#ifdef NS_IMPL_COCOA
[toolbar clearActive];
#else
......@@ -1182,6 +1185,8 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
if (FRAME_TOOLBAR_HEIGHT (f) < 0) // happens if frame is fullscreen.
FRAME_TOOLBAR_HEIGHT (f) = 0;
if (oldh != FRAME_TOOLBAR_HEIGHT (f))
[view updateFrameSize:YES];
if (view->wait_for_tool_bar && FRAME_TOOLBAR_HEIGHT (f) > 0)
[view setNeedsDisplay: YES];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment