[virt-tools-list] [Spice-devel] [PATCH] Disable IME to allow receiving all keys

Frediano Ziglio fziglio at redhat.com
Wed Apr 20 14:29:23 UTC 2016


> 
> My understanding is, Virt-Viewer with ImmDisableIME(-1) can send key events
> even if the title bar is focused when IME is enabled.
> I attached the screenshot of the problem when ImmDisableIME(-1) is not
> applied.
> https://bugzilla.redhat.com/show_bug.cgi?id=1311858#c42
> 
> But spice-gtk can receives all the key events and if ImmDisableIME(-1) is
> applied, users cannot switch IMEs during running Virt-Viewer.
> I tested native client with Internet Explorer 10 in Windows 7 and I couldn't
> see any other differences when ImmDisableIME(-1) is applied.
> 
> If ImmDisableIME(-1) fixes only when the title bar is focused, I'd think the
> customer's bug is different and Virt-Viewer without ImmDisableIME(-1)
> might be more useful because it can switch IMEs during running Virt-Viewer.
> I asked the customer if all the bugs can be fixed without ImmDisableIME(-1).
> 
> Thanks,
> Fujiwara
> 

>From my point of view is an improvement and fix a bug.

However we are not Japanese users and perhaps we don't get your point.
Can you explain a bit the user case issues having this patch in?

Frediano


> On 04/19/16 23:31, Fabiano Fidêncio-san wrote:
> > On Tue, Apr 19, 2016 at 4:11 PM, Fabiano Fidêncio <fabiano at fidencio.org>
> > wrote:
> >> On Tue, Apr 19, 2016 at 4:00 PM, Frediano Ziglio <fziglio at redhat.com>
> >> wrote:
> >>>>
> >>>> On Tue, Apr 19, 2016 at 3:28 PM, Pavel Grunt <pgrunt at redhat.com> wrote:
> >>>>> Ack, I am going to push it.
> >>>>
> >>>> Do we really need this patch upstream?
> >>>> It's a half-solution, at most, that doesn't work on newer Windows.
> >>>>
> >>>
> >>> Are you referring to Window 11? It works on Windows 10.
> >>
> >> Hmm. I was basing my comment on
> >> https://bugzilla.redhat.com/show_bug.cgi?id=1297640#c12 but I didn't
> >> realize your comment
> >> https://bugzilla.redhat.com/show_bug.cgi?id=1297640#c13
> >>
> >> So, yeah, you have my ACK as well, but a better/more descriptive
> >> commit message is needed.
> >>
> >
> > Patch got applied already, so, nevermind.
> >
> >>>
> >>> Frediano
> >>>
> >>>> Also, a better commit message would be more than appreciated in case
> >>>> we really decide to have it upstream.
> >>>>
> >>>>>
> >>>>> Thanks,
> >>>>> Pavel
> >>>>>
> >>>>> On Mon, 2016-04-18 at 14:55 +0100, Frediano Ziglio wrote:
> >>>>>> From: Christophe Fergeau <cfergeau at redhat.com>
> >>>>>>
> >>>>>> This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1297640
> >>>>>>
> >>>>>> Acked-by: Frediano Ziglio <fziglio at redhat.com>
> >>>>>> ---
> >>>>>>   src/virt-viewer-util.c | 7 +++++++
> >>>>>>   1 file changed, 7 insertions(+)
> >>>>>>
> >>>>>> diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c
> >>>>>> index 279f9a5..8cf52ec 100644
> >>>>>> --- a/src/virt-viewer-util.c
> >>>>>> +++ b/src/virt-viewer-util.c
> >>>>>> @@ -30,6 +30,7 @@
> >>>>>>   #ifdef G_OS_WIN32
> >>>>>>   #include <windows.h>
> >>>>>>   #include <io.h>
> >>>>>> +#include <imm.h>
> >>>>>>   #endif
> >>>>>>
> >>>>>>   #include <sys/types.h>
> >>>>>> @@ -272,6 +273,12 @@ void virt_viewer_util_init(const char *appname)
> >>>>>>           dup2(fileno(stdout), STDOUT_FILENO);
> >>>>>>           dup2(fileno(stderr), STDERR_FILENO);
> >>>>>>       }
> >>>>>> +
> >>>>>> +    /* Disable input method handling so that the Zenkaku_Hankaku can
> >>>>>> be passed
> >>>>>> +     * to VMs rather than being captured by Windows.
> >>>>>> +     * https://bugzilla.redhat.com/show_bug.cgi?id=1297640
> >>>>>> +     */
> >>>>>> +    ImmDisableIME(-1);
> >>>>>>   #endif
> >>>>>>
> >>>>>>       setlocale(LC_ALL, "");
> >>>>> _______________________________________________
> >>>>> Spice-devel mailing list
> >>>>> Spice-devel at lists.freedesktop.org
> >>>>> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Fabiano Fidêncio
> >>>>
> >>
> >>
> >>
> >> --
> >> Fabiano Fidêncio
> >
> >
> >
> 
> 




More information about the virt-tools-list mailing list