From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lynbech Christian Newsgroups: gmane.emacs.devel Subject: [PATCH] NextStep frame iconification Date: Tue, 17 Feb 2009 11:35:35 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1234866969 7056 80.91.229.12 (17 Feb 2009 10:36:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 10:36:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 17 11:37:24 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZNKO-0002NV-9r for ged-emacs-devel@m.gmane.org; Tue, 17 Feb 2009 11:37:24 +0100 Original-Received: from localhost ([127.0.0.1]:46737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZNJ3-00049X-Qo for ged-emacs-devel@m.gmane.org; Tue, 17 Feb 2009 05:36:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZNIu-000460-Cr for emacs-devel@gnu.org; Tue, 17 Feb 2009 05:35:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZNIq-00042B-Q4 for emacs-devel@gnu.org; Tue, 17 Feb 2009 05:35:51 -0500 Original-Received: from [199.232.76.173] (port=45528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZNIq-00041q-Gi for emacs-devel@gnu.org; Tue, 17 Feb 2009 05:35:48 -0500 Original-Received: from ebb06.tieto.com ([131.207.168.38]:35278 helo=ebb06.tietoenator.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZNIp-0007op-KU for emacs-devel@gnu.org; Tue, 17 Feb 2009 05:35:48 -0500 X-AuditID: 83cfa826-a1b4abb000000814-47-499a92ff5c0d Original-Received: from stingray.eu.tieto.com (unknown [192.176.143.13]) by ebb06.tietoenator.com (SMTP Mailer) with ESMTP id 43D6936A4A5 for ; Tue, 17 Feb 2009 12:35:43 +0200 (EET) Original-Received: from ul000240.eu.tieto.com ([10.48.99.30]) by stingray.eu.tieto.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 17 Feb 2009 11:35:42 +0100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux) X-OriginalArrivalTime: 17 Feb 2009 10:35:42.0410 (UTC) FILETIME=[7BB762A0:01C990EB] X-Brightmail-Tracker: AAAAAQ2TcO8= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:109123 Archived-At: --=-=-= I have noticed that frames does not behave the same wrt. iconification as under X11 (at least not under OSX) for emacs 23. Suppose you have two frames (C-x 5 2), iconify one (M-x iconify-frame) and leave the other visible on the screen. If you then call `other-frame' (C-x 5 o) then under X11 nothing happens (you select the same frame) but under OSX, the previously iconified frame will get de-iconified and selected. In other words, under X11 'other-frame' ignores iconified frames whereas under OSX all frames are considered equally visible. Apparently (to my naive reading of the code in src/nsterm.m) the problem is exactly that the frame parameters of 'visible' and 'iconified' are not updated as the frame is manipulated. Below is a small patch against nsterm.m which improves on the problem (i.e. iconified frames will again be ignored by 'other-frame') in the sense that frames behave correctly when de-/iconified from within Emacs. It will however not cure the problem if the frame is iconified from the outside (i.e. by clicking in the yellow button), then the frame parameters will still be wrong and thusly iconified windows will pop up. I know too little about NS/Cocoa to know how to do a proper fix, but at least we will get a good bit futher towards a solution and at least for me that routinely uses many frames, it will be very usefull. The diff should apply cleanly against a recent version of the repository. -- Christian --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=diff-nsterm-2-0 Index: nsterm.m =================================================================== --- nsterm.m (revision 1535) +++ nsterm.m (working copy) @@ -1001,6 +1001,10 @@ NSTRACE (x_make_frame_invisible); check_ns (); [[view window] orderOut: NSApp]; + f->visible = 0; + f->iconified = 0; + f->async_visible = 0; + f->async_iconified = 0; } @@ -1031,6 +1035,10 @@ [[view window] setFrame: t display: NO]; } [[view window] miniaturize: NSApp]; + f->visible = 1; + f->iconified = 1; + f->async_iconified = 1; + f->async_visible = 0; } --=-=-= ------------------------+----------------------------------------------------- Christian Lynbech | christian #\@ defun #\. dk ------------------------+----------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic@hal.com (Michael A. Petonic) --=-=-=--