emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Unicode-2] frame doesn't get focused


From: Katsumi Yamaoka
Subject: [Unicode-2] frame doesn't get focused
Date: Mon, 19 Mar 2007 21:25:08 +0900
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)

Hi,

First of all, this problem might happen only with the Fedora Core
systems which run the metacity window manager.  I tested it with
the latest Emacs 23 and the following form:

--8<---------------cut here---------------start------------->8---
(defun test ()
  (interactive)
  (let ((frame (make-frame)))
    (select-frame frame)
    (select-window (frame-first-window frame)))
  (switch-to-buffer "*foo*"))

(local-set-key [f1] 'test)
--8<---------------cut here---------------end--------------->8---

To reproduce the problem, select the frame by clicking the mouse
on the rim (not on an Emacs buffer) of the frame after selecting
another X-frame, and type the [f1] key (not `M-x test RET').
In my case, the new frame is neither selected nor focused.  It
often happens actually when I write a mail in a new message
frame of Gnus.  Emacs 22 works as expected, though.

A solution is to use `select-frame-set-input-focus' instead of
`select-frame'.  So, I'd like to modify gnus-win.el so as to use
`select-frame-set-input-focus'[1] if it is not a bug of Emacs 23.

WDYT?

Best regards,

[1]
*** gnus-win.el~        Sun Jan 21 21:57:16 2007
--- gnus-win.el Mon Mar 19 12:24:19 2007
***************
*** 363,369 ****
            (incf i))
          ;; Select the frame that has the selected buffer.
          (when fresult
!           (select-frame (window-frame fresult)))))
         ;; This is a normal split.
         (t
        (when (> (length subs) 0)
--- 363,369 ----
            (incf i))
          ;; Select the frame that has the selected buffer.
          (when fresult
!           (select-frame-set-input-focus (window-frame fresult)))))
         ;; This is a normal split.
         (t
        (when (> (length subs) 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]