From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Fujii Hironori <fujii.hironori@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#11732: 24.1; Microsoft IME Japanese input problem
Date: Thu, 19 Feb 2015 11:03:58 +0900
Message-ID: <CALus1PnuvdqHNha7gw0+mHiGGMjE+T14pXMtZ8s=7mAGkuiRbQ@mail.gmail.com>
References: <87obohkxga.fsf@XAVIER-PC.i-did-not-set--mail-host-address--so-tickle-me>
	<CALus1Pk3vTbjR5Z73vapXJjCORQrQ2gO4tmZ+man=KFpREEUiQ@mail.gmail.com>
	<83h9uj5jwv.fsf@gnu.org>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1424311521 20707 80.91.229.3 (19 Feb 2015 02:05:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 19 Feb 2015 02:05:21 +0000 (UTC)
Cc: 11732@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 19 03:05:13 2015
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1YOGUK-0007Tw-8J
	for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Feb 2015 03:05:12 +0100
Original-Received: from localhost ([::1]:54555 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1YOGUJ-0007Uu-JW
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Feb 2015 21:05:11 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55481)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YOGUE-0007Qg-5c
	for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 21:05:07 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YOGUA-0006mk-PJ
	for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 21:05:05 -0500
Original-Received: from debbugs.gnu.org ([140.186.70.43]:57011)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YOGUA-0006mE-Mp
	for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 21:05:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YOGUA-0007Py-7X
	for bug-gnu-emacs@gnu.org; Wed, 18 Feb 2015 21:05:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Fujii Hironori <fujii.hironori@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 19 Feb 2015 02:05:02 +0000
Resent-Message-ID: <handler.11732.B11732.142431144228438@debbugs.gnu.org>
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.142431144228438
	(code B ref 11732); Thu, 19 Feb 2015 02:05:02 +0000
Original-Received: (at 11732) by debbugs.gnu.org; 19 Feb 2015 02:04:02 +0000
Original-Received: from localhost ([127.0.0.1]:48251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1YOGTC-0007OQ-52
	for submit@debbugs.gnu.org; Wed, 18 Feb 2015 21:04:02 -0500
Original-Received: from mail-lb0-f178.google.com ([209.85.217.178]:35371)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <fujii.hironori@gmail.com>) id 1YOGTA-0007OB-04
	for 11732@debbugs.gnu.org; Wed, 18 Feb 2015 21:04:00 -0500
Original-Received: by lbjb6 with SMTP id b6so4907062lbj.2
	for <11732@debbugs.gnu.org>; Wed, 18 Feb 2015 18:03:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; 
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=uBHLrYuUvFMm4wiyvgkEj84NkRyhMqd+cCAGjz7l7tY=;
	b=oHU0ehB8TC/PCQ/djkEWwatJ81JXGeO04eRrtNLNxUxIpKv9pS0rd7/1+NEiFKq9bQ
	uz+cKQpJnfSYKhrm1ZrDANk00HomzPrSu9QO+rQzd7CHTGJMwxt3HAW4qdvoWYLhyEvf
	WF3F9L8uebrXzX7oQoYdRbYkW59Mgo/SG8QopGn+qfmv+H/FKl+5sCbZGLusWGFgq74a
	REme5icY5F3zJs73PtRrRJm8Wf9wxUQPs6Lhx/aBLXr2hptiKg8F2VYQC6hXygMhvsH0
	Q+aArXUlG3t4Nn/vv2QYm+atmk59nl2OLcOhvr5PWKNg2y2sFdJo8VP3gaZuJnAFdEdw
	Sftg==
X-Received: by 10.152.44.137 with SMTP id e9mr1941793lam.100.1424311438920;
	Wed, 18 Feb 2015 18:03:58 -0800 (PST)
Original-Received: by 10.112.64.42 with HTTP; Wed, 18 Feb 2015 18:03:58 -0800 (PST)
In-Reply-To: <83h9uj5jwv.fsf@gnu.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=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:99574
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/99574>

Thank your for reviewing the patch, Eli.

On Thu, Feb 19, 2015 at 12:17 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Tue, 17 Feb 2015 19:26:41 +0900
>> From: Fujii Hironori <fujii.hironori@gmail.com>
>>
>> WM_IME_STARTCOMPOSITION should be passed to DefWindowProc.
>
> Thanks, but can you explain the details?
>
> I can understand why we should defer to DefWindowProc if we refrain
> from processing this message, for some reason.  But this last part of
> your patch:
>
>> @@ -3318,17 +3318,17 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
>>
>>         /* Punt if the window was deleted behind our back.  */
>>         if (!BUFFERP (w->contents))
>> -         break;
>> +         goto dflt;
>>
>>         context = get_ime_context_fn (hwnd);
>>
>>         if (!context)
>> -         break;
>> +         goto dflt;
>>
>>         set_ime_composition_window_fn (context, &form);
>>         release_ime_context_fn (hwnd, context);
>>       }
>> -      break;
>> +      goto dflt;
>>
>>      case WM_IME_ENDCOMPOSITION:
>>        ignore_ime_char = 0;
>
> Passes the message to DefWindowProc even if we succeeded to handle
> WM_IME_STARTCOMPOSITION by calling ImmSetCompositionWindow.  Why is
> that needed?

If Emacs processes WM_IME_STARTCOMPOSITION itself,
default composition window won't be shown.

Please see the document for the detail.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd374143%28v=vs.85%29.aspx

| Remarks
|
| This message is a notification to an IME window to open its
| composition window. An application should process this message if it
| displays composition characters itself.
|
| If an application has created an IME window, it should pass this
| message to that window. The DefWindowProc function processes the
| message by passing it to the default IME window.