diff --git a/include/aquamarine/allocator/Swapchain.hpp b/include/aquamarine/allocator/Swapchain.hpp index 0e49025..104dc38 100644 --- a/include/aquamarine/allocator/Swapchain.hpp +++ b/include/aquamarine/allocator/Swapchain.hpp @@ -7,8 +7,8 @@ namespace Aquamarine { class IBackendImplementation; struct SSwapchainOptions { - size_t length = 0; - Hyprutils::Math::Vector2D size; + size_t length = 0; + Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0); uint32_t format = DRM_FORMAT_INVALID; // if you leave this on invalid, the swapchain will choose an appropriate format (and modifier) for you. bool scanout = false, cursor = false /* requires scanout = true */, multigpu = false /* if true, will force linear */; }; diff --git a/include/aquamarine/backend/DRM.hpp b/include/aquamarine/backend/DRM.hpp index b1c569d..2905f03 100644 --- a/include/aquamarine/backend/DRM.hpp +++ b/include/aquamarine/backend/DRM.hpp @@ -236,12 +236,12 @@ namespace Aquamarine { }; struct SDRMConnectorCommitData { - Hyprutils::Memory::CSharedPointer mainFB, cursorFB; + Hyprutils::Memory::CSharedPointer mainFB = nullptr, cursorFB = nullptr; bool modeset = false; bool blocking = false; uint32_t flags = 0; bool test = false; - drmModeModeInfo modeInfo; + drmModeModeInfo modeInfo{0}; struct { uint32_t gammaLut = 0; @@ -323,6 +323,7 @@ namespace Aquamarine { class IDRMImplementation { public: + virtual ~IDRMImplementation() = default; virtual bool commit(Hyprutils::Memory::CSharedPointer connector, SDRMConnectorCommitData& data) = 0; virtual bool reset() = 0; diff --git a/include/aquamarine/buffer/Buffer.hpp b/include/aquamarine/buffer/Buffer.hpp index 99c21bf..feda7a5 100644 --- a/include/aquamarine/buffer/Buffer.hpp +++ b/include/aquamarine/buffer/Buffer.hpp @@ -21,8 +21,8 @@ namespace Aquamarine { class CWLBufferResource; struct SDMABUFAttrs { - bool success = false; - Hyprutils::Math::Vector2D size; + bool success = false; + Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0); uint32_t format = 0; // fourcc uint64_t modifier = 0; diff --git a/include/aquamarine/output/Output.hpp b/include/aquamarine/output/Output.hpp index 6474516..cba15d1 100644 --- a/include/aquamarine/output/Output.hpp +++ b/include/aquamarine/output/Output.hpp @@ -19,7 +19,7 @@ namespace Aquamarine { Hyprutils::Math::Vector2D pixelSize; unsigned int refreshRate = 0 /* in mHz */; bool preferred = false; - std::optional modeInfo; // if this is a drm mode, this will be populated. + std::optional modeInfo = std::nullopt; // if this is a drm mode, this will be populated. }; enum eOutputPresentationMode : uint32_t { diff --git a/src/backend/Backend.cpp b/src/backend/Backend.cpp index a6db06a..f10e0d0 100644 --- a/src/backend/Backend.cpp +++ b/src/backend/Backend.cpp @@ -246,7 +246,7 @@ void Aquamarine::CBackend::updateIdleTimer() { clock_gettime(CLOCK_MONOTONIC, &now); timespecAddNs(&now, ADD_NS); - itimerspec ts = {.it_value = now}; + itimerspec ts = {.it_interval{0, 0}, .it_value = now}; if (timerfd_settime(idle.fd, TFD_TIMER_ABSTIME, &ts, nullptr)) log(AQ_LOG_ERROR, std::format("backend: failed to arm timerfd: {}", strerror(errno))); diff --git a/src/backend/Headless.cpp b/src/backend/Headless.cpp index df4b312..3433778 100644 --- a/src/backend/Headless.cpp +++ b/src/backend/Headless.cpp @@ -176,7 +176,7 @@ void Aquamarine::CHeadlessBackend::updateTimerFD() { clock_gettime(CLOCK_MONOTONIC, &now); timespecAddNs(&now, lowestNs); - itimerspec ts = {.it_value = now}; + itimerspec ts = {.it_interval{0, 0}, .it_value = now}; if (timerfd_settime(timers.timerfd, TFD_TIMER_ABSTIME, &ts, nullptr)) backend->log(AQ_LOG_ERROR, std::format("headless: failed to arm timerfd: {}", strerror(errno))); diff --git a/src/backend/Session.cpp b/src/backend/Session.cpp index be8f4bb..15fcec7 100644 --- a/src/backend/Session.cpp +++ b/src/backend/Session.cpp @@ -722,8 +722,9 @@ void Aquamarine::CSession::handleLibinputEvent(libinput_event* e) { auto tool = hlDevice->toolFrom(libinput_event_tablet_tool_get_tool(tte)); ITablet::SAxisEvent event = { - .tool = tool, - .timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000), + .tool = tool, + .timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000), + .absolute = Hyprutils::Math::Vector2D(0, 0), }; if (libinput_event_tablet_tool_x_has_changed(tte)) {