2019-06-07 12:47:19 +03:00
|
|
|
#include <LibCore/CConfigFile.h>
|
|
|
|
#include <WindowServer/WSCompositor.h>
|
|
|
|
#include <WindowServer/WSEventLoop.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-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-05-25 19: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 12:47:19 +03:00
|
|
|
wm_config->read_num_entry("Screen", "Height", 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-07-17 12:09:09 +03:00
|
|
|
loop.exec();
|
2019-01-16 18:03:50 +03:00
|
|
|
ASSERT_NOT_REACHED();
|
|
|
|
}
|