all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* title bar on MacOS
@ 2006-03-08  9:15 Kazu Yamamoto
  0 siblings, 0 replies; only message in thread
From: Kazu Yamamoto @ 2006-03-08  9:15 UTC (permalink / raw)


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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-08  9:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-08  9:15 title bar on MacOS Kazu Yamamoto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.