unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lynbech Christian <christian.lynbech@tieto.com>
To: emacs-devel@gnu.org
Subject: [PATCH] NextStep frame iconification
Date: Tue, 17 Feb 2009 11:35:35 +0100	[thread overview]
Message-ID: <ytqpljs5fj0o.fsf@ul000240.eu.tieto.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

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


[-- Attachment #2: diff-nsterm-2-0 --]
[-- Type: application/octet-stream, Size: 568 bytes --]

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;
 }
 
 

[-- Attachment #3: Type: text/plain, Size: 371 bytes --]



------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)

             reply	other threads:[~2009-02-17 10:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 10:35 Lynbech Christian [this message]
2009-02-19 12:16 ` [PATCH] NextStep frame iconification Adrian Robert
2009-02-20 11:42   ` Adrian Robert
2009-02-23 12:44     ` Lynbech Christian
2009-03-02  8:29     ` Lynbech Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ytqpljs5fj0o.fsf@ul000240.eu.tieto.com \
    --to=christian.lynbech@tieto.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).