Ensure ScreenTransformation matrix is reset after rendering cube
Cube effect modifies the ScreenTransformation matrix. While each window resets the matrix on a global level it's not reset. That means if the last rendered window had the screen rotated the ScreenTransformation keeps the rotation even after the cube ended. This causes a rotated window in e.g. TaskbarThumbnails. REVIEW: 104918 CCBUG: 299869
This commit is contained in:
parent
1379bbaa83
commit
f24103481e
1 changed files with 7 additions and 0 deletions
|
@ -599,6 +599,13 @@ void CubeEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
|||
desktopNameFrame->setText(effects->desktopName(frontDesktop));
|
||||
desktopNameFrame->render(region, opacity);
|
||||
}
|
||||
// restore the ScreenTransformation after all desktops are painted
|
||||
// if not done GenericShader keeps the rotation data and transforms windows incorrectly in other rendering calls
|
||||
if (ShaderManager::instance()->isValid()) {
|
||||
GLShader *shader = ShaderManager::instance()->pushShader(KWin::ShaderManager::GenericShader);
|
||||
shader->setUniform(GLShader::ScreenTransformation, QMatrix4x4());
|
||||
ShaderManager::instance()->popShader();
|
||||
}
|
||||
} else {
|
||||
effects->paintScreen(mask, region, data);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue