How to set focus on a VTE widget?



Short Question: 

How do I set focus on a VTE widget. gtk_widget_grab_focus doesn't seem
to be doing the right thing.

Long Question: 

I am working on trying to fix a focus bug in tilda a drop down quake
style terminal. The program works as follows:

It creates a window containing an hbox and places the terminal widget
and the scrollbar inside that hbox. It then creates a thread which waits
on a file and in the event of modification shows or hides the toplevel
Window. I would like to make the terminal widget take focus when the
toplevel window is shown. I have tried the following:

gtk_window_set_focus on the window
gtk_widget_grab_focus on both the VTE Terminal Widget and the private
widget inside the VteTerminal structure. 

Neither of these are having the effect I would like as the terminal
widget continues to have a outlined square box for a cursor and does not
grab the keyboard. Am I not doing the right thing to put the focus on
the terminal?

Thanks,
David





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