render, helpers: Call OpenGL destroyMonitorResources on disconnect (#10111)
* render, helpers: Call OpenGL destroyMonitorResources on disconnect * helpers: Add opengl null check
This commit is contained in:
parent
ddae3036ca
commit
7631d4c73f
3 changed files with 9 additions and 4 deletions
|
|
@ -2997,7 +2997,7 @@ void CHyprOpenGLImpl::clearWithTex() {
|
|||
}
|
||||
}
|
||||
|
||||
void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITOR pMonitor) {
|
||||
void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITORREF pMonitor) {
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
|
||||
if (!g_pHyprOpenGL)
|
||||
|
|
@ -3021,7 +3021,8 @@ void CHyprOpenGLImpl::destroyMonitorResources(PHLMONITOR pMonitor) {
|
|||
g_pHyprOpenGL->m_mMonitorBGFBs.erase(TEXIT);
|
||||
}
|
||||
|
||||
Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName);
|
||||
if (pMonitor)
|
||||
Debug::log(LOG, "Monitor {} -> destroyed all render data", pMonitor->szName);
|
||||
}
|
||||
|
||||
void CHyprOpenGLImpl::saveMatrix() {
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class CHyprOpenGLImpl {
|
|||
void scissor(const pixman_box32*, bool transform = true);
|
||||
void scissor(const int x, const int y, const int w, const int h, bool transform = true);
|
||||
|
||||
void destroyMonitorResources(PHLMONITOR);
|
||||
void destroyMonitorResources(PHLMONITORREF);
|
||||
|
||||
void markBlurDirtyForMonitor(PHLMONITOR);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue