mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-02 10:58:03 +02:00
c-f
This commit is contained in:
parent
9316030671
commit
1163688b92
5 changed files with 20 additions and 20 deletions
|
|
@ -2552,10 +2552,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<CPromiseResult<std::string>> result) {
|
||||
if (result->hasError())
|
||||
|
|
|
|||
|
|
@ -501,11 +501,11 @@ static std::string getWorkspaceRuleData(const Config::CWorkspaceRule& r, eHyprCt
|
|||
const std::string default_ = sc<bool>(r.m_isDefault) ? std::format(",\n \"default\": {}", boolToString(r.m_isDefault)) : "";
|
||||
const std::string persistent = sc<bool>(r.m_isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.m_isPersistent)) : "";
|
||||
const std::string gapsIn = sc<bool>(r.m_gapsIn) ?
|
||||
std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.m_gapsIn.value().m_top, r.m_gapsIn.value().m_right, r.m_gapsIn.value().m_bottom, r.m_gapsIn.value().m_left) :
|
||||
"";
|
||||
std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.m_gapsIn.value().m_top, r.m_gapsIn.value().m_right, r.m_gapsIn.value().m_bottom, r.m_gapsIn.value().m_left) :
|
||||
"";
|
||||
const std::string gapsOut = sc<bool>(r.m_gapsOut) ?
|
||||
std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.m_gapsOut.value().m_top, r.m_gapsOut.value().m_right, r.m_gapsOut.value().m_bottom, r.m_gapsOut.value().m_left) :
|
||||
"";
|
||||
std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.m_gapsOut.value().m_top, r.m_gapsOut.value().m_right, r.m_gapsOut.value().m_bottom, r.m_gapsOut.value().m_left) :
|
||||
"";
|
||||
const std::string borderSize = sc<bool>(r.m_borderSize) ? std::format(",\n \"borderSize\": {}", r.m_borderSize.value()) : "";
|
||||
const std::string border = sc<bool>(r.m_noBorder) ? std::format(",\n \"border\": {}", boolToString(!r.m_noBorder.value())) : "";
|
||||
const std::string rounding = sc<bool>(r.m_noRounding) ? std::format(",\n \"rounding\": {}", boolToString(!r.m_noRounding.value())) : "";
|
||||
|
|
@ -525,13 +525,13 @@ static std::string getWorkspaceRuleData(const Config::CWorkspaceRule& r, eHyprCt
|
|||
const std::string default_ = std::format("\tdefault: {}\n", sc<bool>(r.m_isDefault) ? boolToString(r.m_isDefault) : "<unset>");
|
||||
const std::string persistent = std::format("\tpersistent: {}\n", sc<bool>(r.m_isPersistent) ? boolToString(r.m_isPersistent) : "<unset>");
|
||||
const std::string gapsIn = sc<bool>(r.m_gapsIn) ?
|
||||
std::format("\tgapsIn: {} {} {} {}\n", std::to_string(r.m_gapsIn.value().m_top), std::to_string(r.m_gapsIn.value().m_right),
|
||||
std::to_string(r.m_gapsIn.value().m_bottom), std::to_string(r.m_gapsIn.value().m_left)) :
|
||||
std::format("\tgapsIn: <unset>\n");
|
||||
std::format("\tgapsIn: {} {} {} {}\n", std::to_string(r.m_gapsIn.value().m_top), std::to_string(r.m_gapsIn.value().m_right),
|
||||
std::to_string(r.m_gapsIn.value().m_bottom), std::to_string(r.m_gapsIn.value().m_left)) :
|
||||
std::format("\tgapsIn: <unset>\n");
|
||||
const std::string gapsOut = sc<bool>(r.m_gapsOut) ?
|
||||
std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.m_gapsOut.value().m_top), std::to_string(r.m_gapsOut.value().m_right),
|
||||
std::to_string(r.m_gapsOut.value().m_bottom), std::to_string(r.m_gapsOut.value().m_left)) :
|
||||
std::format("\tgapsOut: <unset>\n");
|
||||
std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.m_gapsOut.value().m_top), std::to_string(r.m_gapsOut.value().m_right),
|
||||
std::to_string(r.m_gapsOut.value().m_bottom), std::to_string(r.m_gapsOut.value().m_left)) :
|
||||
std::format("\tgapsOut: <unset>\n");
|
||||
const std::string borderSize = std::format("\tborderSize: {}\n", sc<bool>(r.m_borderSize) ? std::to_string(r.m_borderSize.value()) : "<unset>");
|
||||
const std::string border = std::format("\tborder: {}\n", sc<bool>(r.m_noBorder) ? boolToString(!r.m_noBorder.value()) : "<unset>");
|
||||
const std::string rounding = std::format("\trounding: {}\n", sc<bool>(r.m_noRounding) ? boolToString(!r.m_noRounding.value()) : "<unset>");
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ void CMasterAlgorithm::addTarget(SP<ITarget> 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<Hyprlang::INT>("master:drop_at_cursor");
|
||||
|
|
|
|||
|
|
@ -169,9 +169,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;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ CSinglePixelBufferManagerResource::CSinglePixelBufferManagerResource(UP<CWpSingl
|
|||
|
||||
m_resource->setCreateU32RgbaBuffer([this](CWpSinglePixelBufferManagerV1* res, uint32_t id, uint32_t r, uint32_t g, uint32_t b, uint32_t a) {
|
||||
CHyprColor color{r / sc<float>(std::numeric_limits<uint32_t>::max()), g / sc<float>(std::numeric_limits<uint32_t>::max()),
|
||||
b / sc<float>(std::numeric_limits<uint32_t>::max()), a / sc<float>(std::numeric_limits<uint32_t>::max())};
|
||||
b / sc<float>(std::numeric_limits<uint32_t>::max()), a / sc<float>(std::numeric_limits<uint32_t>::max())};
|
||||
const auto& RESOURCE = PROTO::singlePixel->m_buffers.emplace_back(makeUnique<CSinglePixelBufferResource>(id, m_resource->client(), color));
|
||||
|
||||
if UNLIKELY (!RESOURCE->good()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue