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: Sat, 30 Jun 2018 16:21:41 +0300 Message-ID: <837emgmmu2.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> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530364812 25397 195.159.176.226 (30 Jun 2018 13:20:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 13:20:12 +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 Sat Jun 30 15:20:08 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 1fZFnF-0006JR-RD for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 15:20:02 +0200 Original-Received: from localhost ([::1]:46923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFpN-0007JV-7c for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 09:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFpG-0007JE-Dh for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZFpC-0005yo-8R for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZFpC-0005yb-3o for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZFpB-0008Bz-U0 for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2018 13:22:01 +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.153036490431467 (code B ref 11732); Sat, 30 Jun 2018 13:22:01 +0000 Original-Received: (at 11732) by debbugs.gnu.org; 30 Jun 2018 13:21:44 +0000 Original-Received: from localhost ([127.0.0.1]:40438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFot-0008BR-31 for submit@debbugs.gnu.org; Sat, 30 Jun 2018 09:21:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFoq-0008BE-Gj for 11732@debbugs.gnu.org; Sat, 30 Jun 2018 09:21:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZFoh-0005Yd-DF for 11732@debbugs.gnu.org; Sat, 30 Jun 2018 09:21:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFoh-0005YN-8j; Sat, 30 Jun 2018 09:21:31 -0400 Original-Received: from [176.228.60.248] (port=3038 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fZFog-0006K9-Mr; Sat, 30 Jun 2018 09:21:31 -0400 In-reply-to: <5B377CB8.1030602@gmx.at> (message from martin rudalics on Sat, 30 Jun 2018 14:51:04 +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:148017 Archived-At: > Date: Sat, 30 Jun 2018 14:51:04 +0200 > From: martin rudalics > CC: mhatta@gmail.com, 11732@debbugs.gnu.org > > >> SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0, > >> SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER); > >> SetWindowPos (FRAME_W32_WINDOW (SELECTED_FRAME ()), > >> dialog, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE > >> | SWP_NOACTIVATE); > >> > >> Note that I can't test it because nothing is broken here in the first > >> place. > > > > I think I tried with HWND_TOPMOST, > > You had HWND_TOPMOST here in the patch you attached to the first > message I read. Right, sorry. The issue still stands, though. > > but what it does (and I see it now > > with your suggestion) is it doesn't allow raising any other > > (non-Emacs) window above the file-selection dialog (in the z-order). > > The original code didn't behave that way, so I looked for a better > > option, and HWND_NOTOPMOST seemed to do the job... > > I probably don't understand the original problem sketched as > > But doing so causes trouble with displaying > dialog boxes, such as the file selection dialog or font > selection dialog. > > A dialog box uses a modal window on top of the owning window. 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. > > If not, then why is > > this function called every time we are about to show a dialog box? > > Because a dialog box should appear on top of any support frame. And > it doesn't necessarily do that when both are in the topmost group. > That's why I temporarily remove the support frame from that group. 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? > > I will try on Windows 7 later. Curiously, > > HWND_TOPMOST here doesn't prevent raising other windows above the > > dialog box, as it does with file selector. > > The windows of other applications (including other Emacs instances) or > that of the Emacs instance involved in the dialog? The former. > Note that Emacs waits for the dialog to finish and doesn't redisplay > in this time. Hence if during a dialog I temporarily show another > window on top of the dialog and remove that other window, the text in > the Emacs frame is usually garbled until the dialog finishes. Yes, I know. That wasn't what I was worried about. Thanks.