[Bf-committers] Xserver crash with new render code
Brecht Van Lommel
blendix at pandora.be
Tue Dec 28 03:01:52 CET 2004
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.
More information about the Bf-committers
mailing list