summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index c25751fbb..c6a221af0 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -467,6 +467,15 @@ bool EditBoxInGlobalFocus()
}
/**
+ * Check if a console is focused.
+ * @return returns true if the focused window is a console, else false
+ */
+bool FocusedWindowIsConsole()
+{
+ return _focused_window && _focused_window->window_class == WC_CONSOLE;
+}
+
+/**
* Makes no widget on this window have focus. The function however doesn't change which window has focus.
*/
void Window::UnfocusFocusedWidget()