Re: GtkDrawingArea mouse events



On 1/17/07, Jim George <jimgeorge gmail com> wrote:
1) I am currently trapping the "configure-event" signal and resizing
the array there. Is this the best approach? In my past life, I used to

Yes, this is correct.

2) I had a bug in my program in which I would occasionally get a mouse
cursor position outside the drawing area (for eg: the last time
configure-event was called, I got a 400x400 window, but I'd get pixel
values of, say, x = 403). I handle these by bounds-checking before I
access the array, but why would I get such values in the first place?

No idea :-) maybe you were sent a motion event half-way through the
resize? X is asynchronous under the hood, so strange things can happen
with respect to the timing and ordering of events.

John



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