Hypr/src/main.cpp

32 lines
845 B
C++
Raw Normal View History

/*
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) {
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-20 09:25:21 +01:00
g_pWindowManager->setupManager();
Debug::log(LOG, "Hypr Started!");
2021-11-20 09:25:21 +01:00
while (g_pWindowManager->handleEvent()) {
;
}
Debug::log(LOG, "Hypr reached the end! Exiting...");
return 0;
}