From 72f81c1ad7d0923b69ae24199a58d9d237bf51d9 Mon Sep 17 00:00:00 2001 From: wheaney <42350981+wheaney@users.noreply.github.com> Date: Thu, 3 Jul 2025 13:29:42 -0700 Subject: [PATCH] Fix window focus issue, only render windows from the current desktop --- kwin/src/cubeeffect.cpp | 6 ++++++ kwin/src/qml/DesktopView.qml | 1 + kwin/src/qml/main.qml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kwin/src/cubeeffect.cpp b/kwin/src/cubeeffect.cpp index afa6a3c..5a70d16 100644 --- a/kwin/src/cubeeffect.cpp +++ b/kwin/src/cubeeffect.cpp @@ -155,6 +155,12 @@ void CubeEffect::activate() } setRunning(true); + + // QuickSceneEffect grabs the keyboard and mouse input, which pulls focus away from the active window + // and doesn't allow for interaction with anything on the desktop. These two calls fix that. + // TODO - move away from QuickSceneEffect + effects->ungrabKeyboard(); + effects->stopMouseInterception(this); } void CubeEffect::deactivate() diff --git a/kwin/src/qml/DesktopView.qml b/kwin/src/qml/DesktopView.qml index 4b05db9..b62bc63 100644 --- a/kwin/src/qml/DesktopView.qml +++ b/kwin/src/qml/DesktopView.qml @@ -15,6 +15,7 @@ Item { Repeater { model: KWinComponents.WindowFilterModel { activity: KWinComponents.Workspace.currentActivity + desktop: KWinComponents.Workspace.currentDesktop screenName: desktopView.screen.name windowModel: KWinComponents.WindowModel {} } diff --git a/kwin/src/qml/main.qml b/kwin/src/qml/main.qml index 0352cc3..5d7cfbe 100644 --- a/kwin/src/qml/main.qml +++ b/kwin/src/qml/main.qml @@ -12,7 +12,7 @@ import org.kde.kwin.effect.cube Item { id: root antialiasing: true - focus: true + focus: false required property QtObject effect required property QtObject targetScreen