Files
ladybird/WindowServer/main.cpp
Andreas Kling 71b9ec1ae0 Kernel: Add basic process priority support.
For now, the WindowServer process will run with high priority,
while the Finalizer process will run with low priority.
Everyone else gets to be "normal".

At the moment, priority simply determines the size of your time slices.
2019-02-07 12:21:17 +01:00

27 lines
733 B
C++

#include "Process.h"
#include <SharedGraphics/Font.h>
#include <WindowServer/WSScreen.h>
#include <WindowServer/WSWindowManager.h>
#include <WindowServer/WSMessageLoop.h>
#include <WindowServer/WSWindow.h>
// NOTE: This actually runs as a kernel process.
// I'd like to change this eventually.
void WindowServer_main()
{
current->set_priority(Process::HighPriority);
auto info = current->set_video_resolution(1024, 768);
dbgprintf("Screen is %ux%ux%ubpp\n", info.width, info.height, info.bpp);
WSScreen screen((dword*)info.framebuffer, info.width, info.height);
WSWindowManager::the();
dbgprintf("Entering WindowServer main loop.\n");
WSMessageLoop::the().exec();
ASSERT_NOT_REACHED();
}