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

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

 



Hey,

On Mon, Jun 13, 2016 at 06:07:53AM -0400, Frediano Ziglio wrote:
> > 
> > On Fri, Jun 10, 2016 at 08:45:56AM -0400, Frediano Ziglio wrote:
> > > 
> > > This seems quite strong! I think this will remove the IME context
> > > even from the Windows desktop :)
> > 
> > Oh? I just assumed that the win32 hierarchy was more or less the same as
> > the GTK+ hierarchy, and that iterating win32 windows between the current
> > GTK+ widget and it's GTK+ parent would let us not hardcode just one
> > GetParent()
> > 
> > Forget it if it's all wrong ;)
> > 
> > Christophe
> > 
> 
> Added some debug to the code to understand the hierarchy.
> The HWND parent of the widget if the HWND of GTK parent so at
> least for these 2 classes there is a 1-to-1 relationship.
> These first 2 windows have the same exact size and position
> taking all client area (without title and borders) while the
> grand parent take all window (so even title and borders).
> 
> The Gtk parent of SpiceDisplay, at least used in remote-viewer
> is a GtkBin created in virt-viewer.
> So in the end we are changing a property of another Gtk
> window. I don't know how this would work with spicy or other
> users of this class. I think the reason of this is the way Gtk
> handle the events basically taking all events from all windows
> and dispatching with Gtk logic. This is different from classic
> Windows programs where the dispatching is done by Windows itself.

In short, ImmAssociateContext needs to be called both on the
SpiceDisplay widget (handled by spice-gtk), and on the GTK+ container
it's in, which is owned by the application using spice-gtk? I think I
might be fine with calling ImmAssociateContext on
gtk_widget_get_parent(SpiceDisplay) from within spice-gtk as this is the
more generic solution (ie will do what is needed for every application
using spice-gtk).

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]