From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) Newsgroups: gmane.emacs.devel Subject: title bar on MacOS Date: Wed, 08 Mar 2006 18:15:10 +0900 (JST) Message-ID: <20060308.181510.91258487.kazu@iij.ad.jp> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141855070 17455 80.91.229.2 (8 Mar 2006 21:57:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2006 21:57:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 08 22:57:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FH6db-0004Mo-Fq for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 22:56:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FH6dZ-0006Jn-EC for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 16:56:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FGun4-0003kW-TY for emacs-devel@gnu.org; Wed, 08 Mar 2006 04:17:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FGumr-0003JW-32 for emacs-devel@gnu.org; Wed, 08 Mar 2006 04:17:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGumq-0003In-I2 for emacs-devel@gnu.org; Wed, 08 Mar 2006 04:16:52 -0500 Original-Received: from [202.232.30.157] (helo=omgo.iij.ad.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FGupe-0006T1-4w for emacs-devel@gnu.org; Wed, 08 Mar 2006 04:19:46 -0500 Original-Received: OTM-MO id k289Glvx013027; Wed, 8 Mar 2006 18:16:47 +0900 (JST) DomainKey-Signature: a=rsa-sha1; s=omgo; d=iij.ad.jp; c=nofws; q=dns; h=date:message-id:to:from:x-mailer:mime-version: content-type:content-transfer-encoding; b=WwCM2wFQ3KTHbUNMhQOtqSXNZukrGDetebefSSfiLHmlb6DL0ydegG9mgds8yyUs2 HTmetBqCGx6Bf1Rf+/Z0g== Original-Received: OTM-MIX0 id k289GkTn021837; Wed, 8 Mar 2006 18:16:46 +0900 (JST) Original-Received: from localhost ([202.126.19.211]) by rsmtp.iij.ad.jp (OTM-MR/rsmtp) id k289GfEJ004204 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 8 Mar 2006 18:16:45 +0900 (JST) Original-To: emacs-devel@gnu.org X-Mailer: Mew version 4.2.54 on Emacs 22.0.50 / Mule 5.0 (SAKAKI) X-Mailman-Approved-At: Wed, 08 Mar 2006 16:55:39 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51388 Archived-At: 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;