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->repeatRate = REPEATRATE;
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()};
@ -1586,7 +1586,7 @@ void CInputManager::destroySwitch(SSwitchDevice* pDevice) {
}
void CInputManager::setCursorImageUntilUnset(std::string name) {
g_pHyprRenderer->setCursorFromName(name.c_str());
g_pHyprRenderer->setCursorFromName(name);
m_bCursorImageOverridden = true;
m_sCursorSurfaceInfo.inUse = false;
}

View file

@ -2024,16 +2024,23 @@ void CHyprOpenGLImpl::clearWithTex() {
void CHyprOpenGLImpl::destroyMonitorResources(CMonitor* pMonitor) {
g_pHyprRenderer->makeEGLCurrent();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].mirrorFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].offloadFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].mirrorSwapFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].monitorMirrorFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].blurFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].offMainFB.release();
g_pHyprOpenGL->m_mMonitorRenderResources[pMonitor].stencilTex.destroyTexture();
g_pHyprOpenGL->m_mMonitorBGTextures[pMonitor].destroyTexture();
g_pHyprOpenGL->m_mMonitorRenderResources.erase(pMonitor);
g_pHyprOpenGL->m_mMonitorBGTextures.erase(pMonitor);
auto RESIT = g_pHyprOpenGL->m_mMonitorRenderResources.find(pMonitor);
if (RESIT != g_pHyprOpenGL->m_mMonitorRenderResources.end()) {
RESIT->second.mirrorFB.release();
RESIT->second.offloadFB.release();
RESIT->second.mirrorSwapFB.release();
RESIT->second.monitorMirrorFB.release();
RESIT->second.blurFB.release();
RESIT->second.offMainFB.release();
RESIT->second.stencilTex.destroyTexture();
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);
}