[Bf-committers] Xserver crash with new render code

Ton Roosendaal ton at blender.org
Mon Jan 3 14:40:06 CET 2005


Thanks for tracking this down.

When we moved from glut to ghost this issue was never solved... as you  
can see in comments in the code still ("do not release after 2.24"!).  
Blender still doesnt handle multiple windows properly. Your proposal  
will solve issues, but added long note with it to identify it as a WIP  


On 28 Dec, 2004, at 3:01, Brecht Van Lommel wrote:

> Hi Ton,
> As I reported on irc my Xserver crashes in some situations with the new
> render code, when doing renderwin related stuff.
> I found renderwin_draw is called sometimes after the render has  
> finished
> and the main window has been made active again. More precisely when
> do_render has completed, and mainwindow_make_active() has been called  
> at
> the end of it.
> What happens then is that renderwin_draw sets the renderwin as the
> active window (and draws it ok), but doesn't set the main window back  
> as
> the active window, causing a crash.
> I couldn't find how exactly to redo, it seems to happen randomly. The
> offending renderwin_draw call is caused by a Ghost redraw event, and
> comes from the Xserver.
> Adding the 3 lines of code in renderwin_draw fixed it:
> set_back_mainwindow = (winlay_get_active_window() != rw->win);
> window_make_active(rw->win);
> ...
> window_swap_buffers(rw->win);
> if (set_back_mainwindow)
>     mainwindow_make_active();
> Cheers,
> Brecht.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list