From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kazuhiro Ito Newsgroups: gmane.emacs.bugs Subject: bug#11513: 24.1.50; raise-frame never raise the foreground window on Windows Date: Wed, 23 May 2012 19:48:59 +0900 Message-ID: <20120523104906.CAA5A34803A@msa103.auone-net.jp> 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> <83sjetxs9d.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1337770222 27252 80.91.229.3 (23 May 2012 10:50:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 May 2012 10:50:22 +0000 (UTC) Cc: 11513@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 23 12:50:21 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 1SX992-0000wH-Pv for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 May 2012 12:50:20 +0200 Original-Received: from localhost ([::1]:52476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX992-0005wv-Bw for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 May 2012 06:50:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX98y-0005wf-FJ for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 06:50:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX98w-0000HL-JN for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 06:50:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX98w-0000H9-Fo for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 06:50:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SX99h-0007VF-LT for bug-gnu-emacs@gnu.org; Wed, 23 May 2012 06:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kazuhiro Ito Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 May 2012 10:51: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.133777020328774 (code B ref 11513); Wed, 23 May 2012 10:51:01 +0000 Original-Received: (at 11513) by debbugs.gnu.org; 23 May 2012 10:50:03 +0000 Original-Received: from localhost ([127.0.0.1]:40402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SX98k-0007U3-V3 for submit@debbugs.gnu.org; Wed, 23 May 2012 06:50:03 -0400 Original-Received: from msa103.auone-net.jp ([61.117.18.163]:38911) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SX98g-0007TW-2v for 11513@debbugs.gnu.org; Wed, 23 May 2012 06:50:00 -0400 Original-Received: from GUNGNIR.med.osaka-cu.ac.jp (unknown [114.179.36.76]) by msa103.auone-net.jp (au one net msa) with ESMTP id CAA5A34803A; Wed, 23 May 2012 19:49:06 +0900 (JST) In-Reply-To: <83sjetxs9d.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.1.50 (i386-mingw-nt6.1.7600) MULE/6.0 (HANACHIRUSATO) 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:60300 Archived-At: At Mon, 21 May 2012 22:12:46 +0300, Eli Zaretskii wrote: > 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? raise-frame always make the unexpected result when Emacs frame is the foreground window (I mean Emacs frame is colored as active window) and behind of other application window(s). And, as I described previously, If Emacs frame is not the foreground window raise-frame correctly works. > If so, what's your value of this Registry key: > HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask Key's value is '98 12 07 80 12 00 00 00'. > . 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? I believe that my test case qualifies some of conditions and I confirmed SetForegroundWindow returns 1 even when the unexpected result has been made. > . 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? I don't know exactly, but I think a child window is a windows created with WS_CHILD style. In Emacs, w32_createscrollbar would make scroll bar as a child window. -- Kazuhiro Ito