unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] NextStep frame iconification
@ 2009-02-17 10:35 Lynbech Christian
  2009-02-19 12:16 ` Adrian Robert
  0 siblings, 1 reply; 5+ messages in thread
From: Lynbech Christian @ 2009-02-17 10:35 UTC (permalink / raw)
  To: emacs-devel

[-- 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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] NextStep frame iconification
  2009-02-17 10:35 [PATCH] NextStep frame iconification Lynbech Christian
@ 2009-02-19 12:16 ` Adrian Robert
  2009-02-20 11:42   ` Adrian Robert
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Robert @ 2009-02-19 12:16 UTC (permalink / raw)
  To: emacs-devel

Lynbech Christian <christian.lynbech <at> tieto.com> writes:


> Below is a small patch against nsterm.m which improves on the problem

Thanks, I will take a look at the patch and probably apply it within a few days.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] NextStep frame iconification
  2009-02-19 12:16 ` Adrian Robert
@ 2009-02-20 11:42   ` Adrian Robert
  2009-02-23 12:44     ` Lynbech Christian
  2009-03-02  8:29     ` Lynbech Christian
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Robert @ 2009-02-20 11:42 UTC (permalink / raw)
  To: emacs-devel

Adrian Robert <Adrian.B.Robert <at> gmail.com> writes:

> 
> Lynbech Christian <christian.lynbech <at> tieto.com> writes:
> 
> > Below is a small patch against nsterm.m which improves on the problem
> 
> Thanks, I will take a look at the patch and probably
> apply it within a few days.

I think only the "async" versions of the frame status variables are
supposed to be  set.  I added a missing one to the
EmacsView -windowDidMiniaturize: method and can no
longer reproduce the bug.  I also added the settings to the
x_make_frame_invisible function.  Can you test and make sure
this resolves the issue?








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] NextStep frame iconification
  2009-02-20 11:42   ` Adrian Robert
@ 2009-02-23 12:44     ` Lynbech Christian
  2009-03-02  8:29     ` Lynbech Christian
  1 sibling, 0 replies; 5+ messages in thread
From: Lynbech Christian @ 2009-02-23 12:44 UTC (permalink / raw)
  To: Adrian Robert; +Cc: emacs-devel

>>>>> "Adrian" == Adrian Robert <Adrian.B.Robert@gmail.com> writes:

Adrian> Adrian Robert <Adrian.B.Robert <at> gmail.com> writes:

Adrian> Can you test and make sure this resolves the issue?

I can confirm that problem seemss immediately to have gone away.

I can now start using emacs23 on my mac (at home) and I will report back
in a few days if the issue is all gone.

Thanks for the help so far.

                              -- Christian




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] NextStep frame iconification
  2009-02-20 11:42   ` Adrian Robert
  2009-02-23 12:44     ` Lynbech Christian
@ 2009-03-02  8:29     ` Lynbech Christian
  1 sibling, 0 replies; 5+ messages in thread
From: Lynbech Christian @ 2009-03-02  8:29 UTC (permalink / raw)
  To: Adrian Robert; +Cc: emacs-devel

I have seen no other bad effects of this patch. Thanks for taking this
in.


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-02  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 10:35 [PATCH] NextStep frame iconification Lynbech Christian
2009-02-19 12:16 ` Adrian Robert
2009-02-20 11:42   ` Adrian Robert
2009-02-23 12:44     ` Lynbech Christian
2009-03-02  8:29     ` Lynbech Christian

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).