On Sep 15, 2009, at 6:03 PM, Joe Jones wrote: Hi
I'm porting a small program to OS x. I have to assume it works just fine on linux/X11.
Anyway, this program has a custom widget. It is drawing on this widget in response to keyboard and mouse events (gdk calls, not cairo or GL), only you don't see it unless you happen to be resizing the window at the same time. I read somewhere that os x double buffers everything, so I assume that the drawing commands are going into an off screen surface. I guess on linux these commands go straight onto the screen.
So I look for a way to update the screen, and all I can see is gtk_widget_queue_draw_area and other functions which result in an expose event. Correct me if I'm wrong, I believe inside the expose event handler is the correct place to do drawing?
My main question is, is there a way to draw outside the expose event handler, and have the screen updated.
Sorry if this is a newbie question.
I don't know if it's a newbie question or not. I also don't know what is the answer, but I'm worried that you're doing a lot of "assuming".
Regards, John Ralls
|