Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org
Subject: Re: frames more (Re: multiple message frames)
Date: Fri, 23 Aug 2002 19:02:37 +0900	[thread overview]
Message-ID: <yotly9axyjsx.fsf@jpl.org> (raw)
In-Reply-To: <yotlr8gqqapy.fsf@jpl.org>

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

I've changed my mind. :)

>>>>> In <yotlr8gqqapy.fsf@jpl.org>
>>>>>	Katsumi Yamaoka <yamaoka@jpl.org> wrote:

> Well, there is a non-Gnus frame on the display A, and there is
> an iconified Gnus frame on the display B.  If a user clicks the
> news toolbar (or types M-x gnus-other-frame) on the display A, a
> Gnus frame will be popped up on the display B.  I think it is a
> correct behavior.

No, it's not correct.  That behavior is quite inconvenient if
the display B is away from the display A.  Here's a new one.
Jinhyok, could you please check it whether you are pleased?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2686 bytes --]

--- gnus-util.el~	2002-08-21 12:49:51 +0000
+++ gnus-util.el	2002-08-23 10:01:33 +0000
@@ -1287,6 +1287,16 @@
 	 (when focus-follows-mouse
 	   (set-mouse-position frame (1- (frame-width frame)) 0)))))
 
+(defun gnus-frame-or-window-display-name (object)
+  "Given a frame or window, return the associated display name.
+Return nil otherwise."
+  (if (featurep 'xemacs)
+      (device-name (dfw-device object))
+    (if (or (framep object)
+	    (and (windowp object)
+		 (setq object (window-frame object))))
+	(frame-parameter object 'display))))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here
--- gnus.el~	2002-08-21 23:47:05 +0000
+++ gnus.el	2002-08-23 10:01:33 +0000
@@ -3378,19 +3378,24 @@
 (defun gnus-other-frame (&optional arg)
   "Pop up a frame to read news."
   (interactive "P")
-  (let ((alive (gnus-alive-p)))
-    (unless (and alive
-		 (catch 'found
-		   (walk-windows
-		    (lambda (window)
-		      (when (with-current-buffer (window-buffer window)
-			      (string-match "\\`gnus-.+-mode\\'"
-					    (symbol-name major-mode)))
-			(gnus-select-frame-set-input-focus
-			 (setq gnus-other-frame-object (window-frame window)))
-			(select-window window)
-			(throw 'found t)))
-		    'ignore t)))
+  (let ((alive (gnus-alive-p))
+	(display (gnus-frame-or-window-display-name (selected-frame))))
+    (unless
+	(and
+	 alive
+	 (catch 'found
+	   (walk-windows
+	    (lambda (window)
+	      (when (and (equal display
+				(gnus-frame-or-window-display-name window))
+			 (with-current-buffer (window-buffer window)
+			   (string-match "\\`gnus-.+-mode\\'"
+					 (symbol-name major-mode))))
+		(gnus-select-frame-set-input-focus
+		 (setq gnus-other-frame-object (window-frame window)))
+		(select-window window)
+		(throw 'found t)))
+	    'ignore t)))
       (gnus-select-frame-set-input-focus
        (setq gnus-other-frame-object
 	     (make-frame gnus-other-frame-parameters)))
--- lpath.el~	2002-08-21 12:49:51 +0000
+++ lpath.el	2002-08-23 10:01:33 +0000
@@ -92,7 +92,7 @@
 		     window-edges x-color-values x-popup-menu browse-url
 		     frame-char-height frame-char-width
 		     url-generic-parse-url xml-parse-region
-		     make-network-process))
+		     make-network-process frame-parameter))
       (maybe-bind '(buffer-display-table
 		    buffer-file-coding-system font-lock-defaults
 		    global-face-data gnus-article-x-face-too-ugly
@@ -123,7 +123,8 @@
 		 specifier-instance url-generic-parse-url
 		 valid-image-instantiator-format-p w3-do-setup
 		 window-pixel-height window-pixel-width
-		 xml-parse-region make-network-process)))
+		 xml-parse-region make-network-process
+		 device-name dfw-device)))
 
 (require 'custom)
 

  reply	other threads:[~2002-08-23 10:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 10:15 multiple message frames Katsumi Yamaoka
2002-08-05  6:41 ` Jinhyok Heo
2002-08-07 20:33 ` Reiner Steib
2002-08-12  4:14   ` Katsumi Yamaoka
2002-08-12 10:38     ` Reiner Steib
2002-08-19 10:37       ` Katsumi Yamaoka
2002-08-21 12:51         ` frames more (Re: multiple message frames) Katsumi Yamaoka
2002-08-23  6:25           ` Jinhyok Heo
2002-08-23  7:46             ` Katsumi Yamaoka
2002-08-23 10:02               ` Katsumi Yamaoka [this message]
2002-08-23 10:59                 ` Jinhyok Heo
2002-08-23 11:10                   ` Katsumi Yamaoka
2002-08-26 13:03                     ` Katsumi Yamaoka
2002-09-11 13:37         ` multiple message frames Reiner Steib
2002-09-12  1:51           ` Katsumi Yamaoka
2003-09-11  7:06       ` Katsumi Yamaoka
2003-09-11 10:46         ` Andreas Fuchs

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

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

  git send-email \
    --in-reply-to=yotly9axyjsx.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).