From 285531c4e00b36c2e91efd10875952408de280a1 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 9 Apr 2012 17:12:01 +0800 Subject: [PATCH] Fix a nasty bug where pressing 'Alt' to explore the editor menubar would split the window stack in two, rendering the editor unresponsive --- CHANGELOG.txt | 1 + arch/sdl/window.c | 1 + ui/menubar.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a01f4f2c7..f209cb5d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D1X-Rebirth Changelog -------- main/state.c: in software rendering scale savestate thumbnail to correct size editor/autosave.c, editor/info.c, editor/med.c, editor/objpage.c, editor/texpage.c, include/ui.h, ui/keypad.c, ui/uidraw.c: Get the clock, 'keypad' info, texture choosing page and object choosing page to draw (latter two just show black squares for ogl) +arch/sdl/window.c, ui/menubar.c: Fix a nasty bug where pressing 'Alt' to explore the editor menubar would split the window stack in two, rendering the editor unresponsive 20120408 -------- diff --git a/arch/sdl/window.c b/arch/sdl/window.c index 53ef0859c..6dce4726a 100644 --- a/arch/sdl/window.c +++ b/arch/sdl/window.c @@ -154,6 +154,7 @@ void window_select(window *wind) if (wind->prev) wind->prev->next = wind->next; wind->prev = FrontWindow; + FrontWindow->next = wind; wind->next = NULL; FrontWindow = wind; diff --git a/ui/menubar.c b/ui/menubar.c index a6af74a17..88500cf3d 100644 --- a/ui/menubar.c +++ b/ui/menubar.c @@ -165,7 +165,8 @@ void menu_hide( MENU * menu ) // Can't hide if it's not already drawn if (!menu->Displayed) return; - window_set_visible(menu->wind, 0); // don't draw or receive events + if (menu != &Menu[0]) + window_set_visible(menu->wind, 0); // don't draw or receive events menu->Active = 0; if (Menu[0].wind && menu == &Menu[0])