renderer: double lookup fix, input: double conversion fix (#4124)

This commit is contained in:
nmzik 2023-12-11 17:28:22 +01:00 committed by GitHub
parent 167f2ed3b2
commit 53ce7992be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 12 deletions

View file

@ -853,7 +853,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) {
pKeyboard->repeatDelay = REPEATDELAY; pKeyboard->repeatDelay = REPEATDELAY;
pKeyboard->repeatRate = REPEATRATE; pKeyboard->repeatRate = REPEATRATE;
pKeyboard->numlockOn = NUMLOCKON; pKeyboard->numlockOn = NUMLOCKON;
pKeyboard->xkbFilePath = FILEPATH.c_str(); pKeyboard->xkbFilePath = FILEPATH;
xkb_rule_names rules = {.rules = RULES.c_str(), .model = MODEL.c_str(), .layout = LAYOUT.c_str(), .variant = VARIANT.c_str(), .options = OPTIONS.c_str()}; xkb_rule_names rules = {.rules = RULES.c_str(), .model = MODEL.c_str(), .layout = LAYOUT.c_str(), .variant = VARIANT.c_str(), .options = OPTIONS.c_str()};
@ -1586,7 +1586,7 @@ void CInputManager::destroySwitch(SSwitchDevice* pDevice) {
} }
void CInputManager::setCursorImageUntilUnset(std::string name) { void CInputManager::setCursorImageUntilUnset(std::string name) {
g_pHyprRenderer->setCursorFromName(name.c_str()); g_pHyprRenderer->setCursorFromName(name);
m_bCursorImageOverridden = true; m_bCursorImageOverridden = true;
m_sCursorSurfaceInfo.inUse = false; m_sCursorSurfaceInfo.inUse = false;
} }

View file

@ -2024,16 +2024,23 @@ void CHyprOpenGLImpl::clearWithTex() {
void CHyprOpenGLImpl::destroyMonitorResources(CMonitor* pMonitor) { void CHyprOpenGLImpl::destroyMonitorResources(CMonitor* pMonitor) {
g_pHyprRenderer->makeEGLCurrent(); g_pHyprRenderer->makeEGLCurrent();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].mirrorFB.release(); auto RESIT = g_pHyprOpenGL->m_mMonitorRenderResources.find(pMonitor);
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].offloadFB.release(); if (RESIT != g_pHyprOpenGL->m_mMonitorRenderResources.end()) {
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].mirrorSwapFB.release(); RESIT->second.mirrorFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].monitorMirrorFB.release(); RESIT->second.offloadFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].blurFB.release(); RESIT->second.mirrorSwapFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].offMainFB.release(); RESIT->second.monitorMirrorFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].stencilTex.destroyTexture(); RESIT->second.blurFB.release();
g_pHyprOpenGL->m_mMonitorBGTextures[pMonitor].destroyTexture(); RESIT->second.offMainFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources.erase(pMonitor); RESIT->second.stencilTex.destroyTexture();
g_pHyprOpenGL->m_mMonitorBGTextures.erase(pMonitor); g_pHyprOpenGL->m_mMonitorRenderResources.erase(RESIT);
}
auto TEXIT = g_pHyprOpenGL->m_mMonitorBGTextures.find(pMonitor);
if (TEXIT != g_pHyprOpenGL->m_mMonitorBGTextures.end()) {
TEXIT->second.destroyTexture();
g_pHyprOpenGL->m_mMonitorBGTextures.erase(TEXIT);
}
Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName); Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName);
} }