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

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

Re: [Unicode-2] frame doesn't get focused


From: Kenichi Handa
Subject: Re: [Unicode-2] frame doesn't get focused
Date: Mon, 19 Mar 2007 21:50:01 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Katsumi Yamaoka <address@hidden> writes:

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

That's very strange because Emacs 22 and 23 should not be
different in the codes handling that kind of thing.  

> 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?

I'm not sure.  That may solve the gnus case, but there will
be another code that uses select-frame in the similar
situation.  I think we must first find why only Emacs 23
doesn't work well.

---
Kenichi Handa
address@hidden

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


> _______________________________________________
> emacs-pretest-bug mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug





reply via email to

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