From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#11732: Follow-up to bug#11732 Date: Sat, 30 Jun 2018 14:51:04 +0200 Message-ID: <5B377CB8.1030602@gmx.at> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1530363010 26945 195.159.176.226 (30 Jun 2018 12:50:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 12:50:10 +0000 (UTC) Cc: 11732@debbugs.gnu.org, mhatta@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 30 14:50:05 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 1fZFKC-0006ku-Vs for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 14:50:01 +0200 Original-Received: from localhost ([::1]:46820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFMK-0006xw-AA for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 08:52:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFMD-0006xm-Ha for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 08:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZFMA-0002M9-F1 for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 08:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZFMA-0002Lg-BL for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 08:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZFM9-0007SR-VX for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 08:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2018 12:52: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.153036307628604 (code B ref 11732); Sat, 30 Jun 2018 12:52:01 +0000 Original-Received: (at 11732) by debbugs.gnu.org; 30 Jun 2018 12:51:16 +0000 Original-Received: from localhost ([127.0.0.1]:40415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFLQ-0007RI-Hp for submit@debbugs.gnu.org; Sat, 30 Jun 2018 08:51:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:33331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFLP-0007R4-It for 11732@debbugs.gnu.org; Sat, 30 Jun 2018 08:51:16 -0400 Original-Received: from [192.168.1.101] ([212.95.5.200]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LbuCq-1fydvb1u7Q-00jHGu; Sat, 30 Jun 2018 14:51:07 +0200 In-Reply-To: <83d0w8mrvu.fsf@gnu.org> X-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ImW 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:148012 Archived-At: >> 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. I only moved the SWP_NOACTIVATE from the dialog window to that of the selected frame. > 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. Anything else will almost certainly cause problems with any windowing system we use. > By "support frame" here you mean the dialog box? No. I mean a frame that in many regards acts like a child frame but uses a top-level window instead of a child window. > 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. > If it's an internal setting that should never be seen outside the C > sources, then it should be documented in the commentary preceding > x_set_z_group, and the comment should tell this value is internal, so > that whoever reads the code will understand what each setting wants to > achieve. OK. I'll do that. > This looks good on XP, Your initial patch for the font dialog showed many bad symptoms (buttons not responding, couldn't drag the dialog box, combo box for script dropping down beneath the dialog box) on XP. > 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? 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. martin