mirror of
https://github.com/hyprwm/hyprlock.git
synced 2026-05-27 15:18:13 +02:00
core: eglReleaseThread when we have no outputs
This fixes monitor on/off on the somewhat broken nvidia 580 drivers and potentially other nvidia drivers as well.
This commit is contained in:
parent
34532cbd80
commit
84aa55d223
3 changed files with 7 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ void updateGradientVariable(CAnimatedVariable<CGradientValueData>& av, const flo
|
|||
|
||||
void CHyprlockAnimationManager::tick() {
|
||||
static const auto ANIMATIONSENABLED = g_pConfigManager->getValue<Hyprlang::INT>("animations:enabled");
|
||||
const auto CPY = m_vActiveAnimatedVariables;
|
||||
const auto CPY = m_vActiveAnimatedVariables;
|
||||
|
||||
for (const auto& PAV : CPY) {
|
||||
if (!PAV || !PAV->ok())
|
||||
|
|
|
|||
|
|
@ -306,6 +306,9 @@ void CHyprlock::run() {
|
|||
g_pRenderer->removeWidgetsFor((*outputIt)->m_ID);
|
||||
m_vOutputs.erase(outputIt);
|
||||
}
|
||||
|
||||
if (m_vOutputs.empty())
|
||||
eglReleaseThread();
|
||||
});
|
||||
|
||||
wl_display_roundtrip(m_sWaylandState.display);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "../helpers/MiscFunctions.hpp"
|
||||
#include "../core/hyprlock.hpp"
|
||||
#include "../config/ConfigManager.hpp"
|
||||
#include "../core/Egl.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
|
@ -314,6 +315,8 @@ void CAsyncResourceManager::onResourceFinished(ResourceID id) {
|
|||
|
||||
Log::logger->log(Log::TRACE, "Resource to texture id:{}", id);
|
||||
|
||||
g_pEGL->makeCurrent(nullptr);
|
||||
|
||||
const auto texture = makeAtomicShared<CTexture>();
|
||||
|
||||
const cairo_status_t SURFACESTATUS = (cairo_status_t)RESOURCE->m_asset.cairoSurface->status();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue