all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Masayuki Hatta <mhatta@gmail.com>, martin rudalics <rudalics@gmx.at>
Cc: 11732@debbugs.gnu.org
Subject: bug#11732: Follow-up to bug#11732
Date: Wed, 27 Jun 2018 18:54:04 +0300	[thread overview]
Message-ID: <83y3f0p6n7.fsf@gnu.org> (raw)
In-Reply-To: <CAECZVPAXjLje9ED6fp1hJa4OPbBLd9nVsNMPB4xZ9njuDamF0Q@mail.gmail.com> (message from Masayuki Hatta on Tue, 26 Jun 2018 18:10:26 +0900)

> From: Masayuki Hatta <mhatta@gmail.com>
> Date: Tue, 26 Jun 2018 18:10:26 +0900
> 
> Recently I built Emacs 26.1 on Windows 10 (w/ MSYS2 64bit) with the
> patch as mentioned earlier.  It works as expected and seems to bring
> no lousy side effects anymore.
> 
> This problem has been making Emacs on Windows almost unusable for
> Japanese users (so most of them use their patched binary).  Thus I
> appreciate if you apply the patch again.
> 
> Tested with "File -> Open File" dialog and "(w32-font-select)" dialog.
> Both seem to work.

By "work", do you mean that clicking on anywhere inside these dialogs
leaves the dialogs visible?  On 2 different systems where I tried
this, after applying the patch, clicking anywhere in the dialog box
after it opens causes the dialog box to disappear: it is moved in z
order behind the frame from which the dialog was started.

It's possible that this is somehow related to the fact that I have my
Windows systems configured to enable "active window tracking"
(a.k.a. "focus follows mouse"), but even so, I'd like to be able to
avoid that adverse side effect on systems that are so configured.

Martin, could you perhaps look into this?  I tried various
"solutions", and the best I could come up with is the patch below.  If
it looks right to you (I'm really out of my depth here), then how do
we solve a similar problem in x-select-font?  It doesn't have a
callback function, and if I try adding one, the appearance of the
dialog changes(??) and the OK and CANCEL buttons no longer work.

Also, w32_dialog_in_progress seems to try to solve some similar
problem, but is not really working?  I guess I simply don't understand
why the dialog is lowered when I click on it.

Here's the patch for file_dialog_callback I came up with:

--- src/w32fns.c~	2018-06-11 06:32:21.000000000 +0300
+++ src/w32fns.c	2018-06-27 18:22:27.104228200 +0300
@@ -7520,6 +7520,12 @@ file_dialog_callback (HWND hwnd, UINT ms
 	  HWND list = GetDlgItem (dialog, FILE_NAME_LIST);
 	  int hdr_code;
 
+	  SetWindowPos (dialog, HWND_TOPMOST, 0, 0, 0, 0,
+			SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE
+			| SWP_NOOWNERZORDER);
+	  SetWindowPos (FRAME_W32_WINDOW (SELECTED_FRAME ()),
+			dialog, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+
 	  /* At least on Windows 7, the above attempt to get the window handle
 	     to the File Name Text Field fails.	 The following code does the
 	     job though.  Note that this code is based on my examination of the





  reply	other threads:[~2018-06-27 15:54 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  5:20 bug#11732: 24.1; Microsoft IME Japanese input problem xavier.dahan
2015-02-17 10:26 ` Fujii Hironori
2015-02-18 15:17   ` Eli Zaretskii
2015-02-19  2:03     ` Fujii Hironori
2015-02-19  6:44       ` Eli Zaretskii
     [not found]         ` <CALus1PmqiC8TnQTfcpVFD5ObjqbK_4hkOczRKmG1=+mkWXUHWQ@mail.gmail.com>
2015-02-19 11:44           ` Eli Zaretskii
2015-03-06 20:29             ` Eli Zaretskii
2015-03-06 22:37               ` Fujii Hironori
2015-03-07 10:53                 ` Eli Zaretskii
2015-03-09  2:13               ` Fujii Hironori
2015-03-09 16:30                 ` Eli Zaretskii
2018-06-26  9:10 ` bug#11732: Follow-up to bug#11732 Masayuki Hatta
2018-06-27 15:54   ` Eli Zaretskii [this message]
2018-06-28  8:04     ` martin rudalics
2018-06-28 10:13       ` Masayuki Hatta
2018-06-28 12:25         ` martin rudalics
2018-06-28 13:09           ` Eli Zaretskii
2018-06-28 10:11     ` Masayuki Hatta
2018-06-28 13:28       ` Eli Zaretskii
2018-06-28 19:17         ` Noam Postavsky
2018-06-28 19:24           ` Eli Zaretskii
2018-06-29  7:39             ` Masayuki Hatta
2018-06-29  8:43               ` martin rudalics
2018-06-29  8:59                 ` Eli Zaretskii
2018-06-30  3:14                 ` Masayuki Hatta
2018-06-30  7:46                   ` Eli Zaretskii
2018-06-30  8:30                     ` Masayuki Hatta
2018-06-29  8:56               ` Eli Zaretskii
2018-06-29  8:43     ` martin rudalics
2018-06-29  9:07       ` Eli Zaretskii
2018-06-30  8:06         ` martin rudalics
2018-06-30 11:32           ` Eli Zaretskii
2018-06-30 12:51             ` martin rudalics
2018-06-30 13:21               ` Eli Zaretskii
2018-07-01  9:00                 ` martin rudalics
2018-07-01 14:29                   ` Eli Zaretskii
2018-07-03  8:29                     ` martin rudalics
2018-07-03 18:50                       ` Eli Zaretskii
2018-07-07  7:45                         ` Tak Kunihiro
2018-07-07 10:00                           ` Eli Zaretskii
2018-07-07 10:21                             ` martin rudalics
2018-07-07 11:32                               ` Eli Zaretskii
2018-07-01 14:34             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y3f0p6n7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=11732@debbugs.gnu.org \
    --cc=mhatta@gmail.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.