mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-24 22:30:05 +01:00
renderer: add cursor:zoom_disable_aa for controlling AA on zoom (#12025)
This commit is contained in:
parent
60529e810d
commit
e40873be51
3 changed files with 10 additions and 2 deletions
|
|
@ -1627,6 +1627,12 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
|
||||||
.type = CONFIG_OPTION_BOOL,
|
.type = CONFIG_OPTION_BOOL,
|
||||||
.data = SConfigOptionDescription::SBoolData{false},
|
.data = SConfigOptionDescription::SBoolData{false},
|
||||||
},
|
},
|
||||||
|
SConfigOptionDescription{
|
||||||
|
.value = "cursor:zoom_disable_aa",
|
||||||
|
.description = "If enabled, when zooming, no antialiasing will be used (zoom will be pixelated)",
|
||||||
|
.type = CONFIG_OPTION_BOOL,
|
||||||
|
.data = SConfigOptionDescription::SBoolData{false},
|
||||||
|
},
|
||||||
SConfigOptionDescription{
|
SConfigOptionDescription{
|
||||||
.value = "cursor:enable_hyprcursor",
|
.value = "cursor:enable_hyprcursor",
|
||||||
.description = "whether to enable hyprcursor support",
|
.description = "whether to enable hyprcursor support",
|
||||||
|
|
|
||||||
|
|
@ -751,6 +751,7 @@ CConfigManager::CConfigManager() {
|
||||||
registerConfigVar("cursor:default_monitor", {STRVAL_EMPTY});
|
registerConfigVar("cursor:default_monitor", {STRVAL_EMPTY});
|
||||||
registerConfigVar("cursor:zoom_factor", {1.f});
|
registerConfigVar("cursor:zoom_factor", {1.f});
|
||||||
registerConfigVar("cursor:zoom_rigid", Hyprlang::INT{0});
|
registerConfigVar("cursor:zoom_rigid", Hyprlang::INT{0});
|
||||||
|
registerConfigVar("cursor:zoom_disable_aa", Hyprlang::INT{0});
|
||||||
registerConfigVar("cursor:enable_hyprcursor", Hyprlang::INT{1});
|
registerConfigVar("cursor:enable_hyprcursor", Hyprlang::INT{1});
|
||||||
registerConfigVar("cursor:sync_gsettings_theme", Hyprlang::INT{1});
|
registerConfigVar("cursor:sync_gsettings_theme", Hyprlang::INT{1});
|
||||||
registerConfigVar("cursor:hide_on_key_press", Hyprlang::INT{0});
|
registerConfigVar("cursor:hide_on_key_press", Hyprlang::INT{0});
|
||||||
|
|
|
||||||
|
|
@ -799,7 +799,8 @@ void CHyprOpenGLImpl::begin(PHLMONITOR pMonitor, const CRegion& damage_, CFrameb
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprOpenGLImpl::end() {
|
void CHyprOpenGLImpl::end() {
|
||||||
static auto PZOOMRIGID = CConfigValue<Hyprlang::INT>("cursor:zoom_rigid");
|
static auto PZOOMRIGID = CConfigValue<Hyprlang::INT>("cursor:zoom_rigid");
|
||||||
|
static auto PZOOMDISABLEAA = CConfigValue<Hyprlang::INT>("cursor:zoom_disable_aa");
|
||||||
|
|
||||||
TRACY_GPU_ZONE("RenderEnd");
|
TRACY_GPU_ZONE("RenderEnd");
|
||||||
|
|
||||||
|
|
@ -826,7 +827,7 @@ void CHyprOpenGLImpl::end() {
|
||||||
}
|
}
|
||||||
|
|
||||||
m_applyFinalShader = !m_renderData.blockScreenShader;
|
m_applyFinalShader = !m_renderData.blockScreenShader;
|
||||||
if (m_renderData.mouseZoomUseMouse)
|
if (m_renderData.mouseZoomUseMouse && *PZOOMDISABLEAA)
|
||||||
m_renderData.useNearestNeighbor = true;
|
m_renderData.useNearestNeighbor = true;
|
||||||
|
|
||||||
// copy the damaged areas into the mirror buffer
|
// copy the damaged areas into the mirror buffer
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue