From 069fa318d62f0cb2afb9bcc0c3eda1b1976d3dc5 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 6 Oct 2026 11:02:32 -0400 Subject: [PATCH] island: fix pill jumping sideways when the compact face switches fixes #3668 --- quickshell/Modules/DIsland/DIslandSurface.qml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/DIsland/DIslandSurface.qml b/quickshell/Modules/DIsland/DIslandSurface.qml index 5c74bff9b..d8eb9a2fa 100644 --- a/quickshell/Modules/DIsland/DIslandSurface.qml +++ b/quickshell/Modules/DIsland/DIslandSurface.qml @@ -237,10 +237,15 @@ Item { function syncAnchor() { if (!root.freeMode && !root.embedded) return; - const target = root.resolveTarget(controller.targetDescriptor); - const sameSize = target.width === motion.targetWidth && target.height === motion.targetHeight; - if (root.anchorSnaps || (root.embedded && !motion.running && !controller.expanded && sameSize)) { - motion.snapTo(target); + if (root.anchorSnaps) { + motion.snapTo(root.resolveTarget(controller.targetDescriptor)); + return; + } + // targetDescriptor may not have updated yet when the slot resizes, compactTarget has. + const compact = root.resolveTarget(controller.compactTarget); + const settledCompact = root.embedded && !motion.running && !controller.expanded && compact.width === motion.targetWidth && compact.height === motion.targetHeight; + if (settledCompact) { + motion.snapTo(compact); return; } root.applyTarget();