From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11732: Follow-up to bug#11732 Date: Sun, 01 Jul 2018 17:29:12 +0300 Message-ID: <83sh53kp1j.fsf@gnu.org> References: <87obohkxga.fsf@XAVIER-PC.i-did-not-set--mail-host-address--so-tickle-me> <83y3f0p6n7.fsf@gnu.org> <5B35F120.9040807@gmx.at> <83fu16nepn.fsf@gnu.org> <5B373A21.9050407@gmx.at> <83d0w8mrvu.fsf@gnu.org> <5B377CB8.1030602@gmx.at> <837emgmmu2.fsf@gnu.org> <5B389847.6000204@gmx.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530455296 21619 195.159.176.226 (1 Jul 2018 14:28:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2018 14:28:16 +0000 (UTC) Cc: 11732@debbugs.gnu.org, mhatta@gmail.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 16:28:11 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZdKi-0005Sy-Jz for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2018 16:28:08 +0200 Original-Received: from localhost ([::1]:54592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZdMp-0003kg-W4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2018 10:30:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZdMc-0003jq-5t for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 10:30:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZdMZ-0000K3-1H for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 10:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34331) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZdMY-0000Jy-UK for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 10:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZdMY-0001Q2-LB for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2018 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jul 2018 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11732 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11732-submit@debbugs.gnu.org id=B11732.15304553735398 (code B ref 11732); Sun, 01 Jul 2018 14:30:02 +0000 Original-Received: (at 11732) by debbugs.gnu.org; 1 Jul 2018 14:29:33 +0000 Original-Received: from localhost ([127.0.0.1]:42228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZdM4-0001Oy-Ut for submit@debbugs.gnu.org; Sun, 01 Jul 2018 10:29:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZdM3-0001Om-2r for 11732@debbugs.gnu.org; Sun, 01 Jul 2018 10:29:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZdLu-0008Iq-Hy for 11732@debbugs.gnu.org; Sun, 01 Jul 2018 10:29:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZdLu-0008Ik-EG; Sun, 01 Jul 2018 10:29:22 -0400 Original-Received: from [176.228.60.248] (port=4453 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fZdLt-0003Gk-OI; Sun, 01 Jul 2018 10:29:22 -0400 In-reply-to: <5B389847.6000204@gmx.at> (message from martin rudalics on Sun, 01 Jul 2018 11:00:55 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:148045 Archived-At: > Date: Sun, 01 Jul 2018 11:00:55 +0200 > From: martin rudalics > CC: mhatta@gmail.com, 11732@debbugs.gnu.org > > > I didn't mean the owing window, I meant the other windows on the > > desktop, belonging to applications other than Emacs. Using > > HWND_TOPMOST makes me unable to raise any window of another > > application above the dialog box in the z-order. The existing code > > does allow that. > > Because it leaves the entire z-order handling to Windows. The idea of > using a dialog box is that you tell Windows to glue together the frame > with the dialog box and let no other window enter the z-order in > between these two. How Windows implements that has likely never been > analyzed so we won't know. But I suppose that Windows simply > intercepts all (implicit) z-reorder requests to let no other window > in. Got it, thanks. > Now if Masayuki's proposal breaks this relationship please tell me > exactly how. IIUC you mean to say that with focus follows mouse sans > autoraise the two Emacs windows (always) appear on top of other > applications. But sans autoraise means that the z-order should not > change when you move the mouse so you apparently clicked into another > application's window or tried to Alt-tab to it. Please clarify this > giving us the precise steps you used. The dialog appears on top of the frame from which it was invoked as usual, and as expected (since Windows raises the frame when you click on its menu, the frame is indeed usually on top of the other apps, modulo apps like Task Manager that force themselves on top of everything). Then any click _anywhere_ inside the dialog causes the dialog to disappear, because the owning frame is raised to cover it. A second click at the same coordinates causes the dialog to be shown blinking, as when you click on some part outside the dialog. My workaround for that is to drag the dialog outside of its owning frame, and then use it as usual. Did I explain the situation clearly? Btw, I have now established that focus follows mouse causes this: if I disable it, the problem disappears. And autoraise doesn't affect the issue in any way. I tried both X-Mouse Controls and Winaero Tweaker, on 2 different Windows 7 systems, with the same result: enabling focus-follows-mouse causes the issue, disabling it makes the issue go away. (Of course, both Windows 7 systems were configured by yours truly, so maybe there's some other factor acting as a catalyst. But all else being equal, just turning on and off focus-follows-mouse causes the problem to appear or disappear on those 2 systems.) > > OK, so the call to w32_dialog_in_progress has nothing to do with the > > z-order of the dialog wrt its owning frame, right? > > Right. I meanwhile tried to document this better. Please have a > look. LGTM, thanks.