Re: [gtkmm] sensitivity seems to be 'ignored'



Hello again,

Jeffrey Rush wrote:
Fine :) (see me smile). But how do I 'prevent' the main loop from
taking/recognizing/processing (button press) events (ie. while calculating stuff)? Do you know that coincidentally?

I don't know if you can do this. Just set the window or just the widget to insensitive.

I think the event processing is just

if (!widget->sensitive) return;

so it is not a big overhead.

But I would have to write that line into every callback routine
I have. I've found another way to solve my problem. I call it
the Event-Absorber(tm). :) It works like this: at the end of my
callback routine with the heavy calculations I have
GdkEvent *eventabsorber;

while ((eventabsorber = gdk_event_get()) != NULL)
 gdk_event_free(eventabsorber);

What this does is to 'kill' all events that happened during
heavy calculation phase. I haven't found any negative side
effects of this tweak yet.

Thanks for your help anyway,
many cheers,
Jeffrey Rush.

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx




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