mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 04:29:48 +01:00
xwayland: add nearest neighbor filtering as an opt
This commit is contained in:
parent
e1edfde539
commit
64ce06a353
2 changed files with 8 additions and 0 deletions
|
@ -206,6 +206,8 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["gestures:workspace_swipe_forever"].intValue = 0;
|
configValues["gestures:workspace_swipe_forever"].intValue = 0;
|
||||||
configValues["gestures:workspace_swipe_numbered"].intValue = 0;
|
configValues["gestures:workspace_swipe_numbered"].intValue = 0;
|
||||||
|
|
||||||
|
configValues["xwayland:use_nearest_neighbor"].intValue = 1;
|
||||||
|
|
||||||
configValues["autogenerated"].intValue = 0;
|
configValues["autogenerated"].intValue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -324,8 +324,14 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||||
for (auto& wd : pWindow->m_dWindowDecorations)
|
for (auto& wd : pWindow->m_dWindowDecorations)
|
||||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, offset);
|
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, offset);
|
||||||
|
|
||||||
|
static auto* const PXWLUSENN = &g_pConfigManager->getConfigValuePtr("xwayland:use_nearest_neighbor")->intValue;
|
||||||
|
if (pWindow->m_bIsX11 && *PXWLUSENN)
|
||||||
|
g_pHyprOpenGL->m_RenderData.useNearestNeighbor = true;
|
||||||
|
|
||||||
wlr_surface_for_each_surface(pWindow->m_pWLSurface.wlr(), renderSurface, &renderdata);
|
wlr_surface_for_each_surface(pWindow->m_pWLSurface.wlr(), renderSurface, &renderdata);
|
||||||
|
|
||||||
|
g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false;
|
||||||
|
|
||||||
if (renderdata.decorate && pWindow->m_sSpecialRenderData.border) {
|
if (renderdata.decorate && pWindow->m_sSpecialRenderData.border) {
|
||||||
static auto* const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
|
static auto* const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue