Re: focus question



Quoting Miguel de Icaza (miguel@nuclecu.unam.mx):
> 
> >  We are planning an application, using zvt. I enclosed that to a notebook, and
> > I got focus-problems with it. After I click to the label of notebook, the
> > zvt lost its focus, and couldn't get it.
> 
> Just make sure the widgets on the tabs in the notebook can not be
> focused.  Gnumeric does this.
> 
> Miguel.

i was having a similar problem, trying to use multiple
zvt's.  this patch to zvtterm.c fixes it for me - not sure
if this is the correct fix as i am pretty new to gnome/gtk.

  adam






--- zvtterm.c	Mon Apr 26 10:16:48 1999
+++ zvtterm.c.mine	Sat May 15 13:42:32 1999
@@ -1308,6 +1308,10 @@
   g_return_val_if_fail (ZVT_IS_TERM (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
+  if (!GTK_WIDGET_HAS_FOCUS (widget))
+      gtk_widget_grab_focus (widget);
+
+
   term = ZVT_TERM (widget);
   vx = term->vx;
   zp = gtk_object_get_data (GTK_OBJECT (term), "_zvtprivate");


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