In window_close() prev window did not get EVENT_WINDOW_ACTIVATED but the recent closed window got it causing previous window not being activated anymore and a bunch of memory errors

This commit is contained in:
zicodxx 2010-12-22 01:11:14 +01:00
parent 3bcb0ecdde
commit 70e43722e1
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog D2X-Rebirth Changelog
20101222
--------
arch/sdl/window.c: In window_close() prev window did not get EVENT_WINDOW_ACTIVATED but the recent closed window got it causing previous window not being activated anymore and a bunch of memory errors
20101211 20101211
-------- --------
arch/include/key.h, arch/include/mouse.h, arch/sdl/event.c, arch/sdl/joy.c, arch/sdl/key.c, arch/sdl/mouse.c, arch/sdl/rbaudio.c, arch/sdl/timer.c, include/maths.h, include/timer.h, include/ui.h, main/automap.c, main/console.c, main/digiobj.c, main/editor/medrobot.c, main/editor/medwall.c, main/fireball.c, main/game.c, main/inferno.c, main/kmatrix.c, main/laser.c, main/laser.h, main/lighting.c, main/menu.c, main/multi.c, main/multi.h, main/multibot.c, main/net_ipx.c, main/net_ipx.h, main/net_udp.c, main/net_udp.h, main/newmenu.c, main/scores.c, main/titles.c, ui/listbox.c, ui/mouse.c, ui/scroll.c, ui/window.c: Introduced new data type fix64 to be used for new timers which can last 4462756 years instead of 9 hours; Introduced new timer functions to update and query program time; Used new timer all over the program except GameTime (which comes next) arch/include/key.h, arch/include/mouse.h, arch/sdl/event.c, arch/sdl/joy.c, arch/sdl/key.c, arch/sdl/mouse.c, arch/sdl/rbaudio.c, arch/sdl/timer.c, include/maths.h, include/timer.h, include/ui.h, main/automap.c, main/console.c, main/digiobj.c, main/editor/medrobot.c, main/editor/medwall.c, main/fireball.c, main/game.c, main/inferno.c, main/kmatrix.c, main/laser.c, main/laser.h, main/lighting.c, main/menu.c, main/multi.c, main/multi.h, main/multibot.c, main/net_ipx.c, main/net_ipx.h, main/net_udp.c, main/net_udp.h, main/newmenu.c, main/scores.c, main/titles.c, ui/listbox.c, ui/mouse.c, ui/scroll.c, ui/window.c: Introduced new data type fix64 to be used for new timers which can last 4462756 years instead of 9 hours; Introduced new timer functions to update and query program time; Used new timer all over the program except GameTime (which comes next)

View file

@ -88,7 +88,7 @@ int window_close(window *wind)
wind->prev->next = wind->next; wind->prev->next = wind->next;
if ((prev = window_get_front())) if ((prev = window_get_front()))
WINDOW_SEND_EVENT(wind, EVENT_WINDOW_ACTIVATED); // Reactivate. May cause flashing of some sort, too bad WINDOW_SEND_EVENT(prev, EVENT_WINDOW_ACTIVATED); // Reactivate. May cause flashing of some sort, too bad
d_free(wind); d_free(wind);