2019-01-16 18:03:50 +03:00
|
|
|
#include "Process.h"
|
2019-01-20 01:22:46 +03:00
|
|
|
#include <SharedGraphics/Font.h>
|
2019-01-18 07:41:15 +03:00
|
|
|
#include <WindowServer/WSScreen.h>
|
2019-01-16 18:03:50 +03:00
|
|
|
#include <WindowServer/WSWindowManager.h>
|
2019-01-26 07:28:02 +03:00
|
|
|
#include <WindowServer/WSMessageLoop.h>
|
2019-01-16 18:03:50 +03:00
|
|
|
#include <WindowServer/WSWindow.h>
|
|
|
|
|
|
|
|
// NOTE: This actually runs as a kernel process.
|
|
|
|
// I'd like to change this eventually.
|
|
|
|
|
|
|
|
void WindowServer_main()
|
|
|
|
{
|
2019-02-08 11:47:57 +03:00
|
|
|
WSMessageLoop::the().set_server_process(*current);
|
2019-02-07 14:21:17 +03:00
|
|
|
current->set_priority(Process::HighPriority);
|
2019-02-06 12:17:26 +03:00
|
|
|
auto info = current->set_video_resolution(1024, 768);
|
2019-01-16 18:03:50 +03:00
|
|
|
|
|
|
|
dbgprintf("Screen is %ux%ux%ubpp\n", info.width, info.height, info.bpp);
|
|
|
|
|
2019-01-18 07:41:15 +03:00
|
|
|
WSScreen screen((dword*)info.framebuffer, info.width, info.height);
|
2019-01-16 18:03:50 +03:00
|
|
|
|
|
|
|
WSWindowManager::the();
|
|
|
|
|
|
|
|
dbgprintf("Entering WindowServer main loop.\n");
|
2019-01-26 07:28:02 +03:00
|
|
|
WSMessageLoop::the().exec();
|
2019-01-16 18:03:50 +03:00
|
|
|
|
|
|
|
ASSERT_NOT_REACHED();
|
|
|
|
}
|