Fix getting frame size wrong when restoring desktop.

* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
call updateFrameSize.
This commit is contained in:
Jan D 2014-11-15 14:35:15 +01:00
parent 836c444db7
commit b8c9a4e36d
2 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,8 @@
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>

View file

@ -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];