bug#2546: NS: toolbar height miscalculated

David Reitter <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
With a CVS version (--with-ns):

Emacs -Q
click on button in top right corner to show toolbar
C-x 5 2

--> I get what's shown in the screenshot - the window content is shown  
too low.

I experimented a bit with setting the toolbar height correctly in  
update_frame_toolbar() like this:


   EmacsView *view = FRAME_NS_VIEW (f);
   NSWindow *window = [view window];
   FRAME_NS_TOOLBAR_HEIGHT (f) =
     NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0,  
0)])
     - FRAME_NS_TITLEBAR_HEIGHT (f);

  and then updating the toolbar from x_set_window_size(), but that  
didn't do the trick.  Given that the toolbar is assumed to be much too  
large, maybe the problem isn't even in x_set_window_size.

I suspect it is the same "general bug" that causes further issues when  
the toolbar height is assumed to be too short (from reading the  
source, probably 32 pixels) and when the toolbar is actually higher  
(due to other configuration in a more complex scenario).
pastedGraphic.png (image/png, 26.6 KB) - not displayed
smime.p7s (application/pkcs7-signature, 2.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.