mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 13:29:48 +01:00
core: fix initialization issues in LockSurface (#285)
* LockSurface: handle uninitialized eglWindow in destructor * LockSurface: don't render before configuration
This commit is contained in:
parent
2bce52f094
commit
307e473759
1 changed files with 5 additions and 3 deletions
|
@ -28,7 +28,10 @@ CSessionLockSurface::~CSessionLockSurface() {
|
||||||
wp_viewport_destroy(viewport);
|
wp_viewport_destroy(viewport);
|
||||||
wp_fractional_scale_v1_destroy(fractional);
|
wp_fractional_scale_v1_destroy(fractional);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eglWindow)
|
||||||
wl_egl_window_destroy(eglWindow);
|
wl_egl_window_destroy(eglWindow);
|
||||||
|
|
||||||
ext_session_lock_surface_v1_destroy(lockSurface);
|
ext_session_lock_surface_v1_destroy(lockSurface);
|
||||||
wl_surface_destroy(surface);
|
wl_surface_destroy(surface);
|
||||||
if (frameCallback)
|
if (frameCallback)
|
||||||
|
@ -116,7 +119,7 @@ static const wl_callback_listener callbackListener = {
|
||||||
void CSessionLockSurface::render() {
|
void CSessionLockSurface::render() {
|
||||||
Debug::log(TRACE, "render lock");
|
Debug::log(TRACE, "render lock");
|
||||||
|
|
||||||
if (frameCallback)
|
if (frameCallback || !readyForFrame)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto FEEDBACK = g_pRenderer->renderLock(*this);
|
const auto FEEDBACK = g_pRenderer->renderLock(*this);
|
||||||
|
@ -129,7 +132,6 @@ void CSessionLockSurface::render() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSessionLockSurface::onCallback() {
|
void CSessionLockSurface::onCallback() {
|
||||||
readyForFrame = true;
|
|
||||||
frameCallback = nullptr;
|
frameCallback = nullptr;
|
||||||
|
|
||||||
if (needsFrame && !g_pHyprlock->m_bTerminate && g_pEGL)
|
if (needsFrame && !g_pHyprlock->m_bTerminate && g_pEGL)
|
||||||
|
|
Loading…
Reference in a new issue