Re: Using gtk_widget_set_extension_events() for a button?

On Mon, 2003-10-20 at 17:41, David Bourguignon wrote:
> Owen Taylor wrote:
> > David Bourguignon wrote:
> >>Right now, if I understand correctly, I only have one option to know what device 
> >>pressed a button: derive a new class of button from the drawing area widget. Is 
> >>that correct?
> > 
> > I don't think that would guarantee you any more future compatibility
> > than the simpler hack of calling gdk_input_set_extension_events() on
> > button->event_window in a ::realize signal handler.
> Following your advice, here is the solution I came up with for the 
> scribble-xinput.c example. I define two new signal handlers for the quit button: 
> one for the "realize" signal and the other for the "button_press_event" signal. 
> (I write down the code below for anybody interested in doing the same thing...) 
> It works well in practice. Is this the simple hack you were thinking about?

Yep, that's what I meant.

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