emacs-devel
[Top][All Lists]
Advanced

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

title bar on MacOS


From: 山本和彦
Subject: title bar on MacOS
Date: Wed, 08 Mar 2006 18:15:10 +0900 (JST)

Hello, 

CVS Emacs on MacOS automatically adjusts its position so that its
title bar is visible even if we set the top to a negative number.

Eg:      
        (modify-frame-parameters (selected-frame) '((top . (+ -22))))

This is convenient when the menu bar is visible.

However this is annoying when we try to get the full screen for
presentation (ie. slide show). I'm implementing a presentation tool on
Emacs, called Goby. As you can see the following page, a part of the
title bar cannot be invisible with CVS Emacs.

        http://www.mew.org/~kazu/proj/goby/

The following patch quits the auto adjustment if the menu bar is
invisible. Note I modified Emacs so as to make the menu bar invisible
when menu-bar-mode is executed.

I believe this patch keeps the convenience in most cases and satisfies
my requirement.

If possible, please merge this patch to the CVS tree.

Note also that I don't know how we should do in the #else block.

--Kazu Yamamoto

Index: macterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/macterm.c,v
retrieving revision 1.157
diff -c -r1.157 macterm.c
*** macterm.c   6 Mar 2006 07:56:29 -0000       1.157
--- macterm.c   8 Mar 2006 08:55:55 -0000
***************
*** 5705,5716 ****
  
  #if TARGET_API_MAC_CARBON
    MoveWindowStructure (FRAME_MAC_WINDOW (f), f->left_pos, f->top_pos);
!   /* If the title bar is completely outside the screen, adjust the
!      position. */
!   ConstrainWindowToScreen (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn,
!                          kWindowConstrainMoveRegardlessOfFit
!                          | kWindowConstrainAllowPartial, NULL, NULL);
!   x_real_positions (f, &f->left_pos, &f->top_pos);
  #else
    {
      Rect inner, outer, screen_rect, dummy;
--- 5705,5718 ----
  
  #if TARGET_API_MAC_CARBON
    MoveWindowStructure (FRAME_MAC_WINDOW (f), f->left_pos, f->top_pos);
!   if (IsMenuBarVisible()) {
!     /* If the title bar is completely outside the screen, adjust the
!        position. */
!     ConstrainWindowToScreen (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn,
!                            kWindowConstrainMoveRegardlessOfFit
!                            | kWindowConstrainAllowPartial, NULL, NULL);
!     x_real_positions (f, &f->left_pos, &f->top_pos);
!   }
  #else
    {
      Rect inner, outer, screen_rect, dummy;




reply via email to

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