Re: Managing focus through a GtkSocket - anyone??

Owen Taylor wrote:
> As long as the focus is actually on the text widget or one
> of the other widgets inside the plug, I get the events
> fine.

  D'Oh. Yes, of course.  Hmm. Well, I appear to be one step
further on.  If I <tab> through the meta rangewidgets, when I
get to the gvim plugin I *do* get focus in events (2), and then
immediately I get 2 focus out events and the rangewidgets 'Quit'
button gets focus!

  <shift-tab> back to vim does the same again; it really doesn't
want the vinm to have focus.

  I've put a 'can_focus' flag (just in case) on the vim GtkPlug.

  I've also put a 'grab-focus' on the GtkPlug upon receipt of a
click event, whcih seemed a sensible place to do it. This gives
the vim focus, and lets it keep it.

  But then it coredumps the rangewidgets when I type anything

  Ho hum.

> Before you make gvim work within a plug-socket, you might need to make
> it work as a widget ... it sounds like it doesn't use the widget model
> of keystroke and focus handling but tries to listen for those on the
> toplevel.

  Making it work 'properly' /would/ be ideal :-)  It's actually
mostly using a GtkDrawingArea [which likes to have the focus] to
do it's business, and only then when it thinks it *has* focus
[so it can flash the cursor].

  Now that my GTK is actually passing in the focus events some
how, I can see where it's still wrong elsewhere.

=================- -================
  Neil Bird   Principal Engineer                  |
       work - mailto:neil bird uk thalesgroup com | $> cd /pub
   personal - mailto:neil fnxweb com              | $> more beer

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