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-04-14 06:23:37 +03:00
|
|
|
#include <WindowServer/WSEventLoop.h>
|
2019-05-24 20:32:46 +03:00
|
|
|
#include <WindowServer/WSCompositor.h>
|
2019-03-01 18:16:23 +03:00
|
|
|
#include <signal.h>
|
|
|
|
#include <stdio.h>
|
2019-01-16 18:03:50 +03:00
|
|
|
|
2019-02-17 02:13:47 +03:00
|
|
|
int main(int, char**)
|
2019-01-16 18:03:50 +03:00
|
|
|
{
|
2019-03-01 18: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 06:23:37 +03:00
|
|
|
WSEventLoop loop;
|
2019-02-17 03:43:01 +03:00
|
|
|
WSScreen screen(1024, 768);
|
2019-05-24 20:32:46 +03:00
|
|
|
WSCompositor::the();
|
2019-02-17 02:13:47 +03:00
|
|
|
WSWindowManager window_manager;
|
2019-01-16 18:03:50 +03:00
|
|
|
|
|
|
|
dbgprintf("Entering WindowServer main loop.\n");
|
2019-04-14 06:23:37 +03:00
|
|
|
WSEventLoop::the().exec();
|
2019-01-16 18:03:50 +03:00
|
|
|
ASSERT_NOT_REACHED();
|
|
|
|
}
|