mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 22:05:58 +01:00
fix fadeout blinking transparent windows
This commit is contained in:
parent
71916ee09a
commit
2cf4480969
3 changed files with 25 additions and 0 deletions
|
@ -407,6 +407,18 @@ std::string CConfigManager::getString(std::string v) {
|
|||
return getConfigValueSafe(v).strValue;
|
||||
}
|
||||
|
||||
void CConfigManager::setInt(std::string v, int val) {
|
||||
configValues[v].intValue = val;
|
||||
}
|
||||
|
||||
void CConfigManager::setFloat(std::string v, float val) {
|
||||
configValues[v].floatValue = val;
|
||||
}
|
||||
|
||||
void CConfigManager::setString(std::string v, std::string val) {
|
||||
configValues[v].strValue = val;
|
||||
}
|
||||
|
||||
SMonitorRule CConfigManager::getMonitorRuleFor(std::string name) {
|
||||
SMonitorRule* found = nullptr;
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
int getInt(std::string);
|
||||
float getFloat(std::string);
|
||||
std::string getString(std::string);
|
||||
void setFloat(std::string, float);
|
||||
void setInt(std::string, int);
|
||||
void setString(std::string, std::string);
|
||||
|
||||
SMonitorRule getMonitorRuleFor(std::string);
|
||||
|
||||
|
|
|
@ -481,8 +481,18 @@ void CHyprOpenGLImpl::makeWindowSnapshot(CWindow* pWindow) {
|
|||
timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
||||
// this is a hack but it works :P
|
||||
// we need to disable blur or else we will get a black background, as the shader
|
||||
// will try to copy the bg to apply blur.
|
||||
// this isn't entirely correct, but like, oh well.
|
||||
// small todo: maybe make this correct? :P
|
||||
const auto BLURVAL = g_pConfigManager->getInt("decoration:blur");
|
||||
g_pConfigManager->setInt("decoration:blur", 0);
|
||||
|
||||
g_pHyprRenderer->renderWindow(pWindow, PMONITOR, &now, !pWindow->m_bX11DoesntWantBorders);
|
||||
|
||||
g_pConfigManager->setInt("decoration:blur", BLURVAL);
|
||||
|
||||
// restore original fb
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_iCurrentOutputFb);
|
||||
glViewport(0, 0, g_pHyprOpenGL->m_RenderData.pMonitor->vecSize.x, g_pHyprOpenGL->m_RenderData.pMonitor->vecSize.y);
|
||||
|
|
Loading…
Reference in a new issue