Re: GtkSocket focus behaviour on GTK2.0



Patrick Schiel <schiel dfki de> writes:

> Hi
> 
> I'm using GtkSocket for plugging a gvim instance
> into my program. Worked fine with GTK1.2, but 
> unfortunately I don't get focus for input anymore
> with GTK2.0 :(
> 
> Does somebody have a workaround for this problem?
> The keyboard events get all captured by GTK and
> don't reach vim anymore...

Using GtkSocket to "steal" an application that doesn't
support the plug/socket embedding has something that's
always been "iffy".

For GTK+-2.0 I had the choice between:

 A) Making the focusing more robust with cooperating applications
    and have GtkPlug/Socket interoperate with QxEmbed.

 B) Keeping it half working for stolen applications. (Clicking
    in the stolen application to get focus, tab focus, accelerators,
    etc, never worked, and can't be made to work.)

I don't know if gvim has been ported to GTK+-2.0 yet, but when
it is, it should be trivial for them to add 
gvim --embed-into 0x5234134 by making the toplevel a GtkPlug
rather than a GtkWindow.

Regards,
                                        Owen



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