From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Q on frame focus with MS Windows Date: Wed, 26 Oct 2005 09:03:32 +0200 Message-ID: <435F2A44.5050603@student.lu.se> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1130312092 26530 80.91.229.2 (26 Oct 2005 07:34:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2005 07:34:52 +0000 (UTC) Cc: Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 26 09:34:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUfmQ-0000uZ-V2 for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2005 09:33:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUfmP-0006Ab-I8 for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2005 03:33:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUfK0-0004eo-Gv for emacs-devel@gnu.org; Wed, 26 Oct 2005 03:03:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUfJx-0004eS-IS for emacs-devel@gnu.org; Wed, 26 Oct 2005 03:03:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUfJw-0004eJ-PC for emacs-devel@gnu.org; Wed, 26 Oct 2005 03:03:36 -0400 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EUfJw-0003lK-CW for emacs-devel@gnu.org; Wed, 26 Oct 2005 03:03:36 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn2.hy.skanova.net (7.2.060.1) id 435BDF6A000CE505; Wed, 26 Oct 2005 09:03:33 +0200 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Drew Adams In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44889 Archived-At: Drew Adams wrote: >It turns out that this will do the trick for me: > > (defun foo () (interactive) > (display-buffer (get-buffer-create "foo") > (select-frame-set-input-focus (window-frame (minibuffer-window)))) > >It was select-frame-set-input-focus that I was missing - in particular, >w32-focus-frame. I thought I had already tried it, but I guess not. > > Or, it is just that it is a bit tricky. I think there might be a race condition here. It does not work for me without the `run-with-idle-timer' I suggested. I believe some part of the frame creation is run asynchronously.