Re: GdkEventButton - spacebar?



David,

This is a list for discussing the development /of/ gtk+, you might want
to try: gtk-list gnome org or gtk-app-devel-list gnome org

regards,
Chema
	
On Thu, 2002-09-12 at 20:15, David Swiston wrote:
> Hi guys.  I've ran into a quirk in a program of mine where I have a
> double click callback for a clist.  The double click works fine,
> however, if I tab and select an item in the list with the spacebar I
> get a seg fault.  For some reason, the spacebar is seen as some type
> of mouse click, however, when the event->type is accessed in the
> callback, the seg fault occurs.
> 
>  
> 
> Here is the snippet of code where the seg fault occurs:
> 
>  
> 
> if(event->type != GDK_2BUTTON_PRESS)
> 
> return;
> 
> else
> 
> gtk_clist_get_text(GTK_CLIST(widget), row, 1, &text);
> 
>  
> 
>  
> 
> I am positive that the if statement is where the seg fault occurs.  If
> I comment out the if it works fine with the spacebar, but the mouse
> and spacebar only require a single click.  Is this a situation where
> the event->type is undefined b/c the spacebar isn't a mouse click, and
> if so, how could I check to make sure that the spacebar being pressed
> was not what evoked the callback?
> 
>  
> 
> Forgot to add, the callback is the "select_row".
> 
>  
> 
> Thanks guys!
> 
> 
> 
> ______________________________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
-- 
Chema Celorio <chema ximian com>




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