diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 65a50467e..b80273eef 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2544,10 +2544,10 @@ void CCompositor::openSafeModeBox() { auto box = CAsyncDialogBox::create(I18n::i18nEngine()->localize(I18n::TXT_KEY_SAFE_MODE_TITLE), I18n::i18nEngine()->localize(I18n::TXT_KEY_SAFE_MODE_DESCRIPTION), { - OPT_LOAD, - OPT_OPEN, - OPT_OK, - }); + OPT_LOAD, + OPT_OPEN, + OPT_OK, + }); box->open()->then([OPT_LOAD, OPT_OK, OPT_OPEN, this](SP> result) { if (result->hasError()) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 31c22ac95..5a3d59415 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -491,11 +491,11 @@ static std::string getWorkspaceRuleData(const SWorkspaceRule& r, eHyprCtlOutputF const std::string default_ = sc(r.isDefault) ? std::format(",\n \"default\": {}", boolToString(r.isDefault)) : ""; const std::string persistent = sc(r.isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.isPersistent)) : ""; const std::string gapsIn = sc(r.gapsIn) ? - std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.gapsIn.value().m_top, r.gapsIn.value().m_right, r.gapsIn.value().m_bottom, r.gapsIn.value().m_left) : - ""; + std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.gapsIn.value().m_top, r.gapsIn.value().m_right, r.gapsIn.value().m_bottom, r.gapsIn.value().m_left) : + ""; const std::string gapsOut = sc(r.gapsOut) ? - std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.gapsOut.value().m_top, r.gapsOut.value().m_right, r.gapsOut.value().m_bottom, r.gapsOut.value().m_left) : - ""; + std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.gapsOut.value().m_top, r.gapsOut.value().m_right, r.gapsOut.value().m_bottom, r.gapsOut.value().m_left) : + ""; const std::string borderSize = sc(r.borderSize) ? std::format(",\n \"borderSize\": {}", r.borderSize.value()) : ""; const std::string border = sc(r.noBorder) ? std::format(",\n \"border\": {}", boolToString(!r.noBorder.value())) : ""; const std::string rounding = sc(r.noRounding) ? std::format(",\n \"rounding\": {}", boolToString(!r.noRounding.value())) : ""; @@ -518,9 +518,9 @@ static std::string getWorkspaceRuleData(const SWorkspaceRule& r, eHyprCtlOutputF std::to_string(r.gapsIn.value().m_bottom), std::to_string(r.gapsIn.value().m_left)) : std::format("\tgapsIn: \n"); const std::string gapsOut = sc(r.gapsOut) ? - std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.gapsOut.value().m_top), std::to_string(r.gapsOut.value().m_right), std::to_string(r.gapsOut.value().m_bottom), - std::to_string(r.gapsOut.value().m_left)) : - std::format("\tgapsOut: \n"); + std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.gapsOut.value().m_top), std::to_string(r.gapsOut.value().m_right), std::to_string(r.gapsOut.value().m_bottom), + std::to_string(r.gapsOut.value().m_left)) : + std::format("\tgapsOut: \n"); const std::string borderSize = std::format("\tborderSize: {}\n", sc(r.borderSize) ? std::to_string(r.borderSize.value()) : ""); const std::string border = std::format("\tborder: {}\n", sc(r.noBorder) ? boolToString(!r.noBorder.value()) : ""); const std::string rounding = std::format("\trounding: {}\n", sc(r.noRounding) ? boolToString(!r.noRounding.value()) : ""); diff --git a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp index 7c436b31f..d27a0726b 100644 --- a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp +++ b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp @@ -81,8 +81,8 @@ void CMasterAlgorithm::addTarget(SP target, bool firstMap) { float lastSplitPercent = *PMFACT; auto OPENINGON = isWindowTiled(Desktop::focusState()->window()) && Desktop::focusState()->window()->m_workspace == PWORKSPACE ? - getNodeFromWindow(Desktop::focusState()->window()) : - getMasterNode(); + getNodeFromWindow(Desktop::focusState()->window()) : + getMasterNode(); const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal(); static auto PDROPATCURSOR = CConfigValue("master:drop_at_cursor"); diff --git a/src/managers/screenshare/ScreenshareFrame.cpp b/src/managers/screenshare/ScreenshareFrame.cpp index 7b8dd4282..9c5b5aa68 100644 --- a/src/managers/screenshare/ScreenshareFrame.cpp +++ b/src/managers/screenshare/ScreenshareFrame.cpp @@ -168,9 +168,9 @@ void CScreenshareFrame::renderMonitor() { g_pHyprRenderer->m_renderData.noSimplify = true; // render monitor texture - CBox monbox = CBox{{}, PMONITOR->m_pixelSize} - .transform(Math::wlTransformToHyprutils(Math::invertTransform(PMONITOR->m_transform)), PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y) - .translate(-m_session->m_captureBox.pos()); // vvvv kinda ass-backwards but that's how I designed the renderer... sigh. + CBox monbox = CBox{{}, PMONITOR->m_pixelSize} + .transform(Math::wlTransformToHyprutils(Math::invertTransform(PMONITOR->m_transform)), PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y) + .translate(-m_session->m_captureBox.pos()); // vvvv kinda ass-backwards but that's how I designed the renderer... sigh. const auto OLD = g_pHyprRenderer->m_renderData.renderModif.enabled; g_pHyprRenderer->m_renderData.renderModif.enabled = false; diff --git a/src/protocols/SinglePixel.cpp b/src/protocols/SinglePixel.cpp index c4d838052..a75dce29a 100644 --- a/src/protocols/SinglePixel.cpp +++ b/src/protocols/SinglePixel.cpp @@ -86,7 +86,7 @@ CSinglePixelBufferManagerResource::CSinglePixelBufferManagerResource(UPsetCreateU32RgbaBuffer([this](CWpSinglePixelBufferManagerV1* res, uint32_t id, uint32_t r, uint32_t g, uint32_t b, uint32_t a) { CHyprColor color{r / sc(std::numeric_limits::max()), g / sc(std::numeric_limits::max()), - b / sc(std::numeric_limits::max()), a / sc(std::numeric_limits::max())}; + b / sc(std::numeric_limits::max()), a / sc(std::numeric_limits::max())}; const auto& RESOURCE = PROTO::singlePixel->m_buffers.emplace_back(makeUnique(id, m_resource->client(), color)); if UNLIKELY (!RESOURCE->good()) { diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 2f405fce3..94d78b0bd 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1355,8 +1355,8 @@ WP CHyprOpenGLImpl::renderToFBInternal(const STextureRenderData& data, const bool needsSDRmod = isSDR2HDR(SOURCE_IMAGE_DESCRIPTION->value(), TARGET_IMAGE_DESCRIPTION->value()); const bool needsHDRmod = !needsSDRmod && isHDR2SDR(SOURCE_IMAGE_DESCRIPTION->value(), TARGET_IMAGE_DESCRIPTION->value()); const float maxLuminance = needsHDRmod ? - SOURCE_IMAGE_DESCRIPTION->value().getTFMaxLuminance(-1) : - (SOURCE_IMAGE_DESCRIPTION->value().luminances.max > 0 ? SOURCE_IMAGE_DESCRIPTION->value().luminances.max : SOURCE_IMAGE_DESCRIPTION->value().luminances.reference); + SOURCE_IMAGE_DESCRIPTION->value().getTFMaxLuminance(-1) : + (SOURCE_IMAGE_DESCRIPTION->value().luminances.max > 0 ? SOURCE_IMAGE_DESCRIPTION->value().luminances.max : SOURCE_IMAGE_DESCRIPTION->value().luminances.reference); const auto dstMaxLuminance = TARGET_IMAGE_DESCRIPTION->value().luminances.max > 0 ? TARGET_IMAGE_DESCRIPTION->value().luminances.max : 10000; if (maxLuminance >= dstMaxLuminance * 1.01) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index ad0ebeac5..1c9dde538 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -2220,8 +2220,8 @@ SCMSettings IHyprRenderer::getCMSettings(const NColorManagement::PImageDescripti const bool needsSDRmod = modifySDR && isSDR2HDR(imageDescription->value(), targetImageDescription->value()); const bool needsHDRmod = !needsSDRmod && isHDR2SDR(imageDescription->value(), targetImageDescription->value()); const float maxLuminance = needsHDRmod ? - imageDescription->value().getTFMaxLuminance(-1) : - (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference); + imageDescription->value().getTFMaxLuminance(-1) : + (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference); const auto dstMaxLuminance = targetImageDescription->value().luminances.max > 0 ? targetImageDescription->value().luminances.max : 10000; auto matrix = imageDescription->getPrimaries()->convertMatrix(targetImageDescription->getPrimaries()); @@ -2556,30 +2556,30 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, S auto colorimetry = settings.getPrimaries(); auto luminances = settings.masteringLuminances.max > 0 ? settings.masteringLuminances : - (settings.luminances != SImageDescription::SPCLuminances{} ? - SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} : - SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)}); + (settings.luminances != SImageDescription::SPCLuminances{} ? + SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} : + SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)}); Log::logger->log(Log::TRACE, "ColorManagement primaries {},{} {},{} {},{} {},{}", colorimetry.red.x, colorimetry.red.y, colorimetry.green.x, colorimetry.green.y, - colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y); + colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y); Log::logger->log(Log::TRACE, "ColorManagement min {}, max {}, cll {}, fall {}", luminances.min, luminances.max, settings.maxCLL, settings.maxFALL); return hdr_output_metadata{ - .metadata_type = 0, - .hdmi_metadata_type1 = + .metadata_type = 0, + .hdmi_metadata_type1 = hdr_metadata_infoframe{ - .eotf = eotf, - .metadata_type = 0, - .display_primaries = - { + .eotf = eotf, + .metadata_type = 0, + .display_primaries = + { {.x = to16Bit(colorimetry.red.x), .y = to16Bit(colorimetry.red.y)}, {.x = to16Bit(colorimetry.green.x), .y = to16Bit(colorimetry.green.y)}, {.x = to16Bit(colorimetry.blue.x), .y = to16Bit(colorimetry.blue.y)}, }, - .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)}, - .max_display_mastering_luminance = toNits(luminances.max), - .min_display_mastering_luminance = toNits(luminances.min * 10000), - .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()), - .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()), + .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)}, + .max_display_mastering_luminance = toNits(luminances.max), + .min_display_mastering_luminance = toNits(luminances.min * 10000), + .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()), + .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()), }, }; }