Core: Move to aquamarine (#6608)

Moves Hyprland from wlroots to aquamarine for the backend.

---------

Signed-off-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Co-authored-by: vaxerski <vaxerski@users.noreply.github.com>
Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: diniamo <diniamo53@gmail.com>
This commit is contained in:
Vaxry 2024-07-21 13:09:54 +02:00 committed by GitHub
parent f642fb97df
commit 016da234d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
131 changed files with 4755 additions and 3460 deletions

View file

@ -18,12 +18,13 @@
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <filesystem>
// TODO: cleanup
static bool set_cloexec(int fd, bool cloexec) {
int flags = fcntl(fd, F_GETFD);
if (flags == -1) {
wlr_log_errno(WLR_ERROR, "fcntl failed");
Debug::log(ERR, "fcntl failed");
return false;
}
if (cloexec) {
@ -32,7 +33,7 @@ static bool set_cloexec(int fd, bool cloexec) {
flags = flags & ~FD_CLOEXEC;
}
if (fcntl(fd, F_SETFD, flags) == -1) {
wlr_log_errno(WLR_ERROR, "fcntl failed");
Debug::log(ERR, "fcntl failed");
return false;
}
return true;
@ -44,7 +45,7 @@ static int openSocket(struct sockaddr_un* addr, size_t path_size) {
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
wlr_log_errno(WLR_ERROR, "Failed to create socket %c%s", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
Debug::log(ERR, "failed to create socket {}{}", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
return -1;
}
if (!set_cloexec(fd, true)) {
@ -57,12 +58,12 @@ static int openSocket(struct sockaddr_un* addr, size_t path_size) {
}
if (bind(fd, (struct sockaddr*)addr, size) < 0) {
rc = errno;
wlr_log_errno(WLR_ERROR, "Failed to bind socket %c%s", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
Debug::log(ERR, "failed to bind socket {}{}", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
goto cleanup;
}
if (listen(fd, 1) < 0) {
rc = errno;
wlr_log_errno(WLR_ERROR, "Failed to listen to socket %c%s", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
Debug::log(ERR, "failed to listen to socket {}{}", addr->sun_path[0] ? addr->sun_path[0] : '@', addr->sun_path + 1);
goto cleanup;
}

View file

@ -299,8 +299,8 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
auto id = e->data.data32[0];
auto resource = wl_client_get_object(g_pXWayland->pServer->xwaylandClient, id);
if (resource) {
auto wlrSurface = CWLSurfaceResource::fromResource(resource);
associate(XSURF, wlrSurface);
auto surf = CWLSurfaceResource::fromResource(resource);
associate(XSURF, surf);
}
} else if (e->type == HYPRATOMS["WL_SURFACE_SERIAL"]) {
if (XSURF->wlSerial) {
@ -755,7 +755,7 @@ void CXWM::getVisual() {
}
if (visualtype == NULL) {
wlr_log(WLR_DEBUG, "No 32 bit visualtype\n");
Debug::log(LOG, "xwm: No 32-bit visualtype");
return;
}
@ -768,7 +768,7 @@ void CXWM::getRenderFormat() {
xcb_render_query_pict_formats_cookie_t cookie = xcb_render_query_pict_formats(connection);
xcb_render_query_pict_formats_reply_t* reply = xcb_render_query_pict_formats_reply(connection, cookie, NULL);
if (!reply) {
wlr_log(WLR_ERROR, "Did not get any reply from xcb_render_query_pict_formats");
Debug::log(LOG, "xwm: No xcb_render_query_pict_formats_reply_t reply");
return;
}
xcb_render_pictforminfo_iterator_t iter = xcb_render_query_pict_formats_formats_iterator(reply);
@ -783,7 +783,7 @@ void CXWM::getRenderFormat() {
}
if (format == NULL) {
wlr_log(WLR_DEBUG, "No 32 bit render format");
Debug::log(LOG, "xwm: No 32-bit render format");
free(reply);
return;
}