From: BALLABIO GERARDO > From: Krzysztof Kosiński [mailto:[email protected]] > > The slowdown is not caused by signal emission, but by modify_bg. If you > > write a custom expose handler that draws the cells, the updates are > > instantaneous. See the attached file. > > Wow. I still don't understand why modify_bg would be that slow, but at least > I can work around it, so thank you.
I think now I understand. I guess that modify_bg doesn't just change the background of the widget, but also sends an expose event to have it redrawn. Indeed I removed the queue_draw() call from my example and the cells still get updated. So if I change the background of 400 cells, 400 expose events are queued and it takes quite a lot of time to process them. (Yet the previous Debian release did it much faster, and I don't think it's a theming issue, I'm using the same standard Clearlooks theme, as far as I can see only the wallpaper has changed. So I'd still think it's a regression.) Is there a way to merge all those events into a single one? I suppose that would give a major speedup. Also, can anybody answer my further question (quoted below)? > But now I have another question. If I move the pointer around with no buttons > pressed, the cells change color every time it enters a new cell. But if I > press any button and move the pointer while keeping it pressed, then nothing > happens any more. Only when I release the button the cell where the pointer > is at that moment is activated. In other words, it seems that pressing > buttons inhibits the generation of enter_notify events. I've tried also with > pointer_motion events, but it does exactly the same thing (except it doesn't > activate the cell even when I release the button). I want the program to > behave in the same way whether buttons are pressed or not. How can I do that? Thank you Gerardo _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
