(svn r19904) -Codechange: Make EventState usable outside Window context.

This commit is contained in:
alberth
2010-05-30 12:06:18 +00:00
parent 63c3220e1d
commit b40fc5bab8
4 changed files with 13 additions and 13 deletions

View File

@@ -1938,14 +1938,14 @@ void HandleKeypress(uint32 raw_key)
/* Check if the focused window has a focused editbox */
if (EditBoxInGlobalFocus()) {
/* All input will in this case go to the focused window */
if (_focused_window->OnKeyPress(key, keycode) == Window::ES_HANDLED) return;
if (_focused_window->OnKeyPress(key, keycode) == ES_HANDLED) return;
}
/* Call the event, start with the uppermost window, but ignore the toolbar. */
Window *w;
FOR_ALL_WINDOWS_FROM_FRONT(w) {
if (w->window_class == WC_MAIN_TOOLBAR) continue;
if (w->OnKeyPress(key, keycode) == Window::ES_HANDLED) return;
if (w->OnKeyPress(key, keycode) == ES_HANDLED) return;
}
w = FindWindowById(WC_MAIN_TOOLBAR, 0);
@@ -1961,7 +1961,7 @@ void HandleCtrlChanged()
/* Call the event, start with the uppermost window. */
Window *w;
FOR_ALL_WINDOWS_FROM_FRONT(w) {
if (w->OnCTRLStateChange() == Window::ES_HANDLED) return;
if (w->OnCTRLStateChange() == ES_HANDLED) return;
}
}