From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#11566: 24.0.97; `read-from-minibuffer': focus to standalone minibuffer frame? Date: Tue, 29 May 2012 11:43:00 +0200 Message-ID: <4FC49A24.7000403@gmx.at> References: <6A40227DCFBF427491B710A473E45744@us.oracle.com> <4FC22A8D.6040801@gmx.at> <8D43F91B0096402A9BCA59FE13513358@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338284633 10321 80.91.229.3 (29 May 2012 09:43:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 May 2012 09:43:53 +0000 (UTC) Cc: 11566@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 29 11:43:52 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SZIxz-0001lb-S0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2012 11:43:52 +0200 Original-Received: from localhost ([::1]:50958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZIxz-000506-5H for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2012 05:43:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZIxr-0004tp-6O for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 05:43:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZIxp-0002Te-Bk for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 05:43:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZIxp-0002TR-8T for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 05:43:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SZIz9-0002xU-4t for bug-gnu-emacs@gnu.org; Tue, 29 May 2012 05:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 May 2012 09:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11566 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11566-submit@debbugs.gnu.org id=B11566.133828467311310 (code B ref 11566); Tue, 29 May 2012 09:45:03 +0000 Original-Received: (at 11566) by debbugs.gnu.org; 29 May 2012 09:44:33 +0000 Original-Received: from localhost ([127.0.0.1]:47555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZIye-0002wM-VF for submit@debbugs.gnu.org; Tue, 29 May 2012 05:44:33 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:33189) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SZIyc-0002w9-DO for 11566@debbugs.gnu.org; Tue, 29 May 2012 05:44:31 -0400 Original-Received: (qmail invoked by alias); 29 May 2012 09:43:02 -0000 Original-Received: from 62-47-42-71.adsl.highway.telekom.at (EHLO [62.47.42.71]) [62.47.42.71] by mail.gmx.net (mp040) with SMTP; 29 May 2012 11:43:02 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/HGhFRvQzHsrzhmqnG5YvZlwXG2AWDddLEC46m7V bRlwxtHt8fWTEn In-Reply-To: <8D43F91B0096402A9BCA59FE13513358@us.oracle.com> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60448 Archived-At: >> IIUC `read-from-minibuffer' uses `redirect-frame-focus' to send the >> keystrokes to the minibuffer window. If that function works >> for you in general, we likely have a race condition in this special case. > > If so, what could a solution/fix be for it? You didn't tell us whether it works for you "in general". If you work with two frames for "some time" does `redirect-frame-focus' what it is supposed to do? If it doesn't we have a strange situation where, citing from Ito's comment in bug#11513, > > When I run lower-frame function in Emacs frame interactively, Emacs > > frame is brought behind of other application window(s) but has focus. > > Key inputs are passed to lowered frame. I tested 4 Windows PC, and > > all PCs show the same behavior. so Windows OT1H handles key input passed to a frame that is not in the foreground and OTOH doesn't pass key input to another frame even if explicitly asked to do so. >> > Shouldn't [`read-from-minibuffer'] have the responsibility >> > here to give the minibuffer frame the focus? >> >> Yes. But the window manager must not intercept it. > > But that's what seems to be happening (intercept or interrupt or some such). That's what we have to find out. >> Try the sit-for approach. Try to make a standalone example like >> (let ((old-frame ... some existing frame)) >> (make-frame) >> (redirect-frame-focus old-frame)) >> and see whether it fails giving focus to `old-frame'. > > Still not sure what you mean by using `sit-for' (how/where?). But I tried that > simple example, and yes, it systematically fails to give focus to `old-frame'. > The newly created frame keeps the focus - every time. I suppose my example was just silly. Maybe you should try again with (let ((old-frame (selected-frame)) (new-frame (make-frame))) (redirect-frame-focus new-frame old-frame)) I don't know anything about `redirect-frame-focus' and can't test it reliably here because I'm using special autoraise-frame settings which likely interfere with any such focus redirection. martin