From: Jens G. <fi...@us...> - 2013-03-15 14:04:53
|
gemrb: Infinity Engine emulator The branch master has been updated via 0dcc067b342fd7acacc5a213c7192523cdab4ee6 (commit) Summary of changes: gemrb/core/GUI/EventMgr.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) from ddb332a091ae837ab00f55a1f91a9c31a54e04c0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=0dcc067b342fd7acacc5a213c7192523cdab4ee6 commit 0dcc067b342fd7acacc5a213c7192523cdab4ee6 Author: Jens Granseuer <je...@gm...> Date: Fri Mar 15 14:59:25 2013 +0100 when closing the focused window, automatically re-focus the one below One thing focus is needed for is for tooltips to show up. E.g., without this change if you went to the spellbook, opened the spell info window for a spell and closed it again, you would no longer get tooltips for spells. diff --git a/gemrb/core/GUI/EventMgr.cpp b/gemrb/core/GUI/EventMgr.cpp index a74cbdf..d41293c 100644 --- a/gemrb/core/GUI/EventMgr.cpp +++ b/gemrb/core/GUI/EventMgr.cpp @@ -125,7 +125,8 @@ void EventMgr::Clear() /** Remove a Window from the array */ void EventMgr::DelWindow(Window *win) { - if (last_win_focused == win) { + bool focused = (last_win_focused == win); + if (focused) { last_win_focused = NULL; } if (last_win_mousefocused == win) { @@ -152,6 +153,10 @@ void EventMgr::DelWindow(Window *win) for (t = topwin.begin(); t != topwin.end(); ++t) { if ( (*t) == pos) { topwin.erase( t ); + if (focused && topwin.size() > 0) { + //revert focus to new top window + SetFocused(windows[topwin[0]], NULL); + } return; } } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |