Re: [gtk-list] Re: Drawing area question



On 8 Jul 1998, Owen Taylor wrote:

>  - You need to make sure that the drawing area gets the focus. 
>    That means:
>   
>     GTK_WIDGET_SET_FLAGS (darea, GTK_CAN_FOCUS);
>     gtk_widget_grab_focus (darea);

This was very confusing for me the first time, and obviously has stumped
other as well.  So I must ask, why the redundancy?  If I call
gtk_widget_grab_focus, isn't it obvious I want the widget to get the focus
whether I set GTK_CAN_FOCUS or not?  And, doesn't it make sense that if I
have set GTK_CAN_FOCUS, I expect to get the focus at the appropriate times
without explicitly asking for it?

I know there's a good answer based on how X does things (which I'd be
grateful to hear), but how about a (single) new function that just does
what most of us expect? 

Thanks,
Andrew



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