@Override
    public void inputStarted() {
        gui.updateTime();
        if (!Display.isActive()) {
            gui.clearKeyboardState();
            gui.clearMouseState();

            if (gui.getRootPane() instanceof RootPane) {
                ((RootPane) gui.getRootPane()).keyboardFocusLost();
            }
        }
    }