2021-11-18 18:04:09 +01:00
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
Hypr Window Manager for X.
|
|
|
|
|
Started by Vaxry on 2021 / 11 / 17
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "windowManager.hpp"
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
|
Debug::log(LOG, "Hypr debug log. Built on " + std::string(__DATE__) + " at " + std::string(__TIME__));
|
|
|
|
|
|
2021-11-20 09:25:21 +01:00
|
|
|
g_pWindowManager->DisplayConnection = xcb_connect(NULL, NULL);
|
|
|
|
|
if (const auto RET = xcb_connection_has_error(g_pWindowManager->DisplayConnection); RET != 0) {
|
2021-11-18 18:04:09 +01:00
|
|
|
Debug::log(CRIT, "Connection Failed! Return: " + std::to_string(RET));
|
|
|
|
|
return RET;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-20 09:25:21 +01:00
|
|
|
g_pWindowManager->Screen = xcb_setup_roots_iterator(xcb_get_setup(g_pWindowManager->DisplayConnection)).data;
|
2021-11-18 18:04:09 +01:00
|
|
|
|
2021-11-20 09:25:21 +01:00
|
|
|
g_pWindowManager->setupManager();
|
2021-11-18 18:04:09 +01:00
|
|
|
|
|
|
|
|
Debug::log(LOG, "Hypr Started!");
|
|
|
|
|
|
2021-11-20 09:25:21 +01:00
|
|
|
while (g_pWindowManager->handleEvent()) {
|
2021-11-18 18:04:09 +01:00
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Debug::log(LOG, "Hypr reached the end! Exiting...");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|