Re: [spice-gtk] widget: Disable IME context on display widget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 15, 2016 at 07:28:26AM -0400, Frediano Ziglio wrote:
> > 
> > Hi Frediano,
> > 
> > On Wed, 2016-06-15 at 11:54 +0100, Frediano Ziglio wrote:
> > > This prevent Windows to handle IME on the widget which cause the
> > > application to not receive keyboard events.
> > > 
> > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > > ---
> > >  src/spice-widget.c | 9 +++++++++
> > >  1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/src/spice-widget.c b/src/spice-widget.c
> > > index c528614..595c8f5 100644
> > > --- a/src/spice-widget.c
> > > +++ b/src/spice-widget.c
> > > @@ -1687,6 +1687,15 @@ static gboolean focus_in_event(GtkWidget *widget,
> > > GdkEventFocus *focus G_GNUC_UN
> > >          return true;
> > >  
> > >      release_keys(display);
> > > +#ifdef G_OS_WIN32
> > > +    /* Reset the IME context of the focused window.
> > > +     * Note that the focused window can be different from SpiceDisplay
> > > +     * one but the events are received and forwarder by this window. */
> > 
> > Does it mean that events intended to be for the window but not for
> > SpiceDisplay
> > will be now forwarded to SpiceDisplay ? e.g.: navigation in menu items using
> > accelerators (alt+v to open the view menu)
> > 
> > Pavel
> > 
> 
> No means that Windows keyboard events were/are never sent to
> SpiceDisplay Windows' window (the "focus" is related to keyboard events).
> This patch does not change the events flow, just disable IME processing
> for the Windows window that handle keyboard events for SpiceDisplay.

Yeah, the patch looks good to me, less worrying that the previous
iterations. Better this way than having some magic GetParent()
assumption. And should be mostly robust to GTK+ changes (unless they
start doing something with IME too). However, it would be good to add to
the commit log exactly how to notice breakage without this patch (or was
this done in a previously committed patch already?)

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]