IME: Add direct support for Fcitx IME input, with SDL2 on *nix/X11.

This commit is contained in:
Jonathan G Rennison
2019-10-09 20:57:28 +01:00
parent 91e05f6306
commit 24b5cb0fdb
3 changed files with 380 additions and 10 deletions

View File

@@ -454,6 +454,21 @@ void SetFocusedWindow(Window *w)
if (_focused_window != nullptr) _focused_window->OnFocus(old_focused);
}
Point GetFocusedWindowCaret()
{
return _focused_window->GetCaretPosition();
}
Point GetFocusedWindowTopLeft()
{
return { _focused_window->left, _focused_window->top };
}
bool FocusedWindowIsConsole()
{
return _focused_window && _focused_window->window_class == WC_CONSOLE;
}
/**
* Check if an edit box is in global focus. That is if focused window
* has a edit box as focused widget, or if a console is focused.