/
dgrigorev
/
MicroNT
Обзор
Документация
Войти
/
dgrigorev
/
MicroNT
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
kernel/sm/inputhost.cpp
46 строк
1 KB
Дмитрий Григорьев
Add input desktop focus bootstrap
19 май 2026, 08:32
19 май 2026, 08:32
2183b88
Код
Авторство
О чём код?
// inputhost.cpp -- MicroNT interactive input routing boundary. #include "../include/inputhost.h" #include "../include/debug.h" namespace INPUTHOST { void Init() { Debug::Print("[INPUTHOST] Input host initialized\r\n"); } bool AttachDesktop(InputDesktop& input, const WINSTA::Desktop& desktop) { if (desktop.SessionId == 0) return false; input.SessionId = desktop.SessionId; input.AttachedToDesktop = true; input.FocusedShellSurface = false; input.CursorVisible = false; Debug::Printf("[INPUTHOST] Session %u input desktop attached\r\n", input.SessionId); return true; } bool FocusShellSurface(InputDesktop& input, const SHELLHOST::ShellSurface& surface) { if (!input.AttachedToDesktop || surface.SessionId != input.SessionId || !surface.BoundToExplorer) { return false; } input.FocusedShellSurface = true; Debug::Printf("[INPUTHOST] Session %u shell surface focused\r\n", input.SessionId); return true; } bool ShowCursor(InputDesktop& input) { if (!input.FocusedShellSurface) return false; input.CursorVisible = true; Debug::Printf("[INPUTHOST] Session %u cursor visible\r\n", input.SessionId); return true; } } // namespace INPUTHOST