emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] [emacs] 01/01: Fix getting frame size wrong when restoring


From: Jan D.
Subject: [Emacs-diffs] [emacs] 01/01: Fix getting frame size wrong when restoring desktop.
Date: Sat, 15 Nov 2014 13:35:26 +0000

jhd pushed a commit to branch emacs-24
in repository emacs.

commit b8c9a4e36dc3525fa03e0e0d862693dc26137b5f
Author: Jan D <address@hidden>
Date:   Sat Nov 15 14:35:15 2014 +0100

    Fix getting frame size wrong when restoring desktop.
    
    * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
    call updateFrameSize.
---
 src/ChangeLog |    3 +++
 src/nsmenu.m  |    5 +++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 16ec712..b431dd2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
 2014-11-15  Jan Djärv  <address@hidden>
 
+       * 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  <address@hidden>
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 2484224..323b287 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -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];
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]