diff --git a/effects/lookingglass/lookingglass.cpp b/effects/lookingglass/lookingglass.cpp index 07739d0b25..1ad78266ad 100644 --- a/effects/lookingglass/lookingglass.cpp +++ b/effects/lookingglass/lookingglass.cpp @@ -161,8 +161,11 @@ void LookingGlassEffect::toggle() polling = false; effects->stopMousePolling(); } - m_enabled = false; + if (zoom == target_zoom) { + m_enabled = false; + } } + effects->addRepaint(cursorPos().x() - radius, cursorPos().y() - radius, 2 * radius, 2 * radius); } void LookingGlassEffect::zoomIn() @@ -181,11 +184,13 @@ void LookingGlassEffect::zoomOut() target_zoom -= 0.5; if (target_zoom < 1) { target_zoom = 1; - m_enabled = false; if (polling) { polling = false; effects->stopMousePolling(); } + if (zoom == target_zoom) { + m_enabled = false; + } } effects->addRepaint(cursorPos().x() - radius, cursorPos().y() - radius, 2 * radius, 2 * radius); }