plugins/backgroundcontrast,blur: correct support checks
On Xorg, the effects need support for OpenGL blits, but on Wayland, the screen texture can be used instead
This commit is contained in:
parent
60a483471c
commit
b35edf8d30
2 changed files with 2 additions and 13 deletions
|
@ -296,18 +296,7 @@ bool ContrastEffect::enabledByDefault()
|
|||
|
||||
bool ContrastEffect::supported()
|
||||
{
|
||||
bool supported = effects->isOpenGLCompositing();
|
||||
|
||||
if (supported) {
|
||||
int maxTexSize;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTexSize);
|
||||
|
||||
const QSize screenSize = effects->virtualScreenSize();
|
||||
if (screenSize.width() > maxTexSize || screenSize.height() > maxTexSize) {
|
||||
supported = false;
|
||||
}
|
||||
}
|
||||
return supported;
|
||||
return effects->openglContext() && (effects->openglContext()->supportsBlits() || effects->waylandDisplay());
|
||||
}
|
||||
|
||||
QRegion ContrastEffect::contrastRegion(const EffectWindow *w) const
|
||||
|
|
|
@ -371,7 +371,7 @@ bool BlurEffect::enabledByDefault()
|
|||
|
||||
bool BlurEffect::supported()
|
||||
{
|
||||
return effects->openglContext() && effects->openglContext()->supportsBlits();
|
||||
return effects->openglContext() && (effects->openglContext()->supportsBlits() || effects->waylandDisplay());
|
||||
}
|
||||
|
||||
bool BlurEffect::decorationSupportsBlurBehind(const EffectWindow *w) const
|
||||
|
|
Loading…
Reference in a new issue