From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11513: 24.1.50; raise-frame never raise the foreground window on Windows Date: Mon, 21 May 2012 22:12:46 +0300 Message-ID: <83sjetxs9d.fsf@gnu.org> References: <20120518210617.D4D181E0043@msa101.auone-net.jp> <83obpkzjhs.fsf@gnu.org> <20120519120231.7181D2C037@msa104.auone-net.jp> <83havcz6i6.fsf@gnu.org> <4FB79899.8040408@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1337627615 30058 80.91.229.3 (21 May 2012 19:13:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 19:13:35 +0000 (UTC) Cc: kzhr@d1.dion.ne.jp, 11513@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 21 21:13:33 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 1SWY2s-00033O-D0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2012 21:13:30 +0200 Original-Received: from localhost ([::1]:42269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWY2r-0000ku-NF for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2012 15:13:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWY2o-0000k5-GP for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 15:13:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWY2m-00030F-Ae for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 15:13:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWY2m-0002zq-79 for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 15:13:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SWY3O-00074E-18 for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 May 2012 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11513 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11513-submit@debbugs.gnu.org id=B11513.133762760727115 (code B ref 11513); Mon, 21 May 2012 19:14:01 +0000 Original-Received: (at 11513) by debbugs.gnu.org; 21 May 2012 19:13:27 +0000 Original-Received: from localhost ([127.0.0.1]:37601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWY2p-00073I-HM for submit@debbugs.gnu.org; Mon, 21 May 2012 15:13:27 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:44216) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWY2m-000733-Js for 11513@debbugs.gnu.org; Mon, 21 May 2012 15:13:25 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M4D00200ZAH9V00@a-mtaout20.012.net.il> for 11513@debbugs.gnu.org; Mon, 21 May 2012 22:12:38 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4E002FH0126Y40@a-mtaout20.012.net.il>; Mon, 21 May 2012 22:12:38 +0300 (IDT) In-reply-to: <4FB79899.8040408@gmx.at> X-012-Sender: halo1@inter.net.il 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:60267 Archived-At: > Date: Sat, 19 May 2012 14:56:57 +0200 > From: martin rudalics > CC: Kazuhiro Ito , 11513@debbugs.gnu.org > > > Would other Windows users please try reproducing this problem on their > > machines? > > Not reproducible on Windows XP. Tested with release and trunk, both > built by myself. It's a very elusive problem. I managed to reproduce it on 1 system out of 3 to which I have constant access, and even that only for a few minutes and under some conditions. E.g., when lowering the frame left only the left side of the Emacs frame visible, the bug would manifest itself; whereas when its right side was visible, it won't. And once I reshuffled the other windows a bit, the bug disappeared and I couldn't reproduce it anymore. Do you get the faulty behavior consistently? If so, what's your value of this Registry key: HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask Anyway, back to the discussion, I notice that: . The documentation of SetForegroundWindow (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633539%28v=vs.85%29.aspx) lists quite a few of conditions under which the function will succeed; are you sure at least one of them was true when you tried? can you look at the value of 'retval' after the function returns without bringing the frame to the foreground? . This page: http://stackoverflow.com/questions/1544179/what-are-the-differences-between-bringwindowtotop-setforegroundwindow-setwindo seems to tell that BringWindowToTop might fail as well, if it is applied to a child window. What does this mean in terms of Emacs frames? . There are quite a few discussions about this that Google picks up, and most of them clearly say that using BringWindowToTop isn't sufficient, either.