Procedure to find which window should gain focus in the first check what window contains mouse pointer and save that window check if keystroke, then adjust focus and save as current focus else set current focus = saved mouse focus.
| 415 | // else |
| 416 | // set current focus = saved mouse focus. |
| 417 | void ui_DoWindowFocus() { |
| 418 | // right now, the topmost window always has focus! |
| 419 | tUIWindowNode *wndnode = UIWindowTail; |
| 420 | if (wndnode) |
| 421 | UIWindowFocus = wndnode->wnd; |
| 422 | else |
| 423 | UIWindowFocus = NULL; |
| 424 | } |
| 425 | // returns a result and processes input of a window in focus |
| 426 | int ui_ProcessFocusedWindow() { |
| 427 | int res = -1; |