diff --git a/autotests/test_xcb_wrapper.cpp b/autotests/test_xcb_wrapper.cpp index b7ae0845de..1fe1934c23 100644 --- a/autotests/test_xcb_wrapper.cpp +++ b/autotests/test_xcb_wrapper.cpp @@ -298,7 +298,8 @@ void TestXcbWrapper::testTransientFor() // Create a Window with a transient for hint Window transientWindow(createWindow()); - transientWindow.changeProperty(XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &m_testWindow); + xcb_window_t testWindowId = m_testWindow; + transientWindow.changeProperty(XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &testWindowId); // let's get another transient object TransientFor realTransient(transientWindow); diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index fe0d467b12..e32b17fa34 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -385,7 +385,7 @@ bool BlurEffect::shouldBlur(const EffectWindow *w, int mask, const WindowPaintDa bool blurBehindDecos = effects->decorationsHaveAlpha() && effects->decorationSupportsBlurBehind(); - if (!w->hasAlpha() && !(blurBehindDecos && w->hasDecoration())) + if (!w->hasAlpha() && w->opacity() >= 1.0 && !(blurBehindDecos && w->hasDecoration())) return false; return true; @@ -479,7 +479,14 @@ void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float o // Modulate the blurred texture with the window opacity if the window isn't opaque if (opacity < 1.0) { glEnable(GL_BLEND); - glBlendColor(0, 0, 0, opacity); +#if 1 // bow shape, always above y = x + float o = 1.0f-opacity; + o = 1.0f - o*o; +#else // sigmoid shape, above y = x for x > 0.5, below y = x for x < 0.5 + float o = 2.0f*opacity - 1.0f; + o = 0.5f + o / (1.0f + qAbs(o)); +#endif + glBlendColor(0, 0, 0, o); glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); } diff --git a/effects/magnifier/magnifier.cpp b/effects/magnifier/magnifier.cpp index 0bb925ea1a..4f8f81d0a9 100644 --- a/effects/magnifier/magnifier.cpp +++ b/effects/magnifier/magnifier.cpp @@ -153,7 +153,14 @@ void MagnifierEffect::paintScreen(int mask, QRegion region, ScreenPaintData& dat m_fbo->blitFromFramebuffer(srcArea); // paint magnifier m_texture->bind(); + auto s = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture); + QMatrix4x4 mvp; + const QSize size = effects->virtualScreenSize(); + mvp.ortho(0, size.width(), size.height(), 0, 0, 65535); + mvp.translate(area.x(), area.y()); + s->setUniform(GLShader::ModelViewProjectionMatrix, mvp); m_texture->render(infiniteRegion(), area); + ShaderManager::instance()->popShader(); m_texture->unbind(); QVector verts; GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer(); diff --git a/screenedge.cpp b/screenedge.cpp index 35d84a04eb..b657675e54 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -137,6 +137,10 @@ bool Edge::check(const QPoint &cursorPos, const QDateTime &triggerTime, bool for if (!triggersFor(cursorPos)) { return false; } + if (m_lastTrigger.isValid() && // still in cooldown + m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) { + return false; + } // no pushback so we have to activate at once bool directActivate = forceNoPushBack || edges()->cursorPushBackDistance().isNull() || m_client; if (directActivate || canActivate(cursorPos, triggerTime)) {