diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 84b7a099b..64b486a8f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20100806 +-------- +arch/sdl/event.c: Between event sending, exit event_process if front window is different, fixing netgame joining problem introduced with commit on 20100731 + 20100803 -------- main/hud.c: When updating redundant HUD messages check the for-loop not the start with a negative number - causes too long message display and negative array index diff --git a/arch/sdl/event.c b/arch/sdl/event.c index 0c5a4358d..82ce7ea8e 100644 --- a/arch/sdl/event.c +++ b/arch/sdl/event.c @@ -109,10 +109,15 @@ int call_default_handler(d_event *event) void event_process(void) { d_event event; - window *wind; + window *wind = window_get_front(); event_poll(); // send input events first + // Doing this prevents problems when an idle event can create a newmenu, + // such as some network menus when they report a problem + if (window_get_front() != wind) + return; + event.type = EVENT_IDLE; if ((wind = window_get_front())) { @@ -122,6 +127,9 @@ void event_process(void) else call_default_handler(&event); + if (window_get_front() != wind) + return; + event.type = EVENT_WINDOW_DRAW; // then draw all visible windows for (wind = window_get_first(); wind != NULL; wind = window_get_next(wind)) if (window_is_visible(wind))