Thanks for the quick response.  I had thought about using 
gdk_window_begin_paint_rect and gdk_window_end_paint but that will cause 
the data on the screen to be erased, right?  I would love to be able to 
draw directly on top of whatever is currently visible to the user.  Do 
you know if that is possible?

Mike Emmel wrote:
> You can draw outside of a paint event you just need to place
> gdk_window_begin_paint_rect/end drawing calls around the code. Don't
> forget to call
> gdk_flush() after end its a no-op on directfb but required for X11 if
> you wan't to
> see anything under X.
> The above model maps nicely to directfb and better works on all 
> platforms.
>
> gdk_window_begin_paint_rect
> ...draw stuff
> gdk_window_end_paint
> gdk_flush
>
> If you call the above outside the paint thread have fun with enter/leave
> you probably will find all my deadlock problems.
>
> You can also if you wish send exposes and call
> gdk_window_process_updates which is in my opinion cleaner.
>
> gdk_window_invalidate_rect
> gdk_window_process_updates
> gdk_flush
>
>
> Drawing outside the expose handler given you have
> gdk_window_invalidate_rect/process_updates does not make a lot of
> sense. Its quite fast and works all the time the only cost over
> begin/end
> is allocation of the expose event and insures you are not cleared by
> system expose events.
>
> What motivated the change is for directfb its the wrong drawing model.
> It was really a artifcact of the original GTK/X11 implementation that 
> you could
> do this. There are a thousand reasons to not allow a ui toolkit to
> assume it is possible to draw to the screen without guard calls. X11
> got it wrong the original port tried to emulate the X11 way leading to
> poor performance since you flipped on every draw op now Gtk has moved
> away from this model.
>
> Mike
>
>
>> _______________________________________________
>> directfb-dev mailing list
>> [email protected]
>> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>>
>


_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to