A method for returning focus to a user interface window is disclosed.
Information relating to each user interface window existing within a
computer operating system is stored in a working database that is
different from real-time user interface window information maintained by
the computer operating system. A top user interface window is determined
at a display coordinate selected by, for example, a digitizing pen. Focus
is returned to a last user interface window having focus when the top
user interface window is a system user interface window. An informational
context is determined for the top window, and data entered into the top
window is recognized based on the informational context of the top window
based on information stored in the working database.