2019-06-07 06:47:19 -03:00
|
|
|
#include <LibCore/CConfigFile.h>
|
|
|
|
|
#include <WindowServer/WSCompositor.h>
|
|
|
|
|
#include <WindowServer/WSEventLoop.h>
|
2019-01-18 02:41:15 -02:00
|
|
|
#include <WindowServer/WSScreen.h>
|
2019-01-16 13:03:50 -02:00
|
|
|
#include <WindowServer/WSWindowManager.h>
|
2019-03-01 12:16:23 -03:00
|
|
|
#include <signal.h>
|
|
|
|
|
#include <stdio.h>
|
2019-01-16 13:03:50 -02:00
|
|
|
|
2019-02-16 21:13:47 -02:00
|
|
|
int main(int, char**)
|
2019-01-16 13:03:50 -02:00
|
|
|
{
|
2019-03-01 12:16:23 -03:00
|
|
|
struct sigaction act;
|
|
|
|
|
memset(&act, 0, sizeof(act));
|
|
|
|
|
act.sa_flags = SA_NOCLDWAIT;
|
|
|
|
|
act.sa_handler = SIG_IGN;
|
|
|
|
|
int rc = sigaction(SIGCHLD, &act, nullptr);
|
|
|
|
|
if (rc < 0) {
|
|
|
|
|
perror("sigaction");
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-14 00:23:37 -03:00
|
|
|
WSEventLoop loop;
|
2019-05-25 13:26:23 -03:00
|
|
|
|
|
|
|
|
auto wm_config = CConfigFile::get_for_app("WindowManager");
|
|
|
|
|
WSScreen screen(wm_config->read_num_entry("Screen", "Width", 1024),
|
2019-06-07 06:47:19 -03:00
|
|
|
wm_config->read_num_entry("Screen", "Height", 768));
|
2019-05-24 14:32:46 -03:00
|
|
|
WSCompositor::the();
|
2019-09-21 19:17:53 -03:00
|
|
|
auto wm = WSWindowManager::construct();
|
2019-01-16 13:03:50 -02:00
|
|
|
|
|
|
|
|
dbgprintf("Entering WindowServer main loop.\n");
|
2019-07-17 06:09:09 -03:00
|
|
|
loop.exec();
|
2019-01-16 13:03:50 -02:00
|
|
|
ASSERT_NOT_REACHED();
|
|
|
|
|
}
|