]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix getting frame size wrong when restoring desktop.
authorJan D <jan.h.d@swipnet.se>
Sat, 15 Nov 2014 13:35:15 +0000 (14:35 +0100)
committerJan D <jan.h.d@swipnet.se>
Sat, 15 Nov 2014 13:35:15 +0000 (14:35 +0100)
* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
call updateFrameSize.

src/ChangeLog
src/nsmenu.m

index 16ec7125967d85628e9337116553a3418e214929..b431dd255a986e3e539f8d63a0aa51cd082faa6e 100644 (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>
index 24842241f37e22d8f89583bd62bf3edeacd60415..323b287a401887cb2510c4cccedb1f101783bfaf 100644 (file)
@@ -1072,10 +1072,13 @@ update_frame_tool_bar (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 @@ update_frame_tool_bar (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];