From 3ede995b270bd85610422eea36bfe9139b3b5107 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 19 Feb 2024 14:46:07 +0000 Subject: [PATCH] overview: Only handled input events in on-screen desktops kwin does not support true multiscreen drag and drops. Events are sent to an offscreen location of the screen initiating the drag. Therefore it is important that off-screen items do not process drop events BUG: 481331 --- src/plugins/overview/qml/main.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/overview/qml/main.qml b/src/plugins/overview/qml/main.qml index cb364ec46a..8788295563 100644 --- a/src/plugins/overview/qml/main.qml +++ b/src/plugins/overview/qml/main.qml @@ -412,7 +412,11 @@ FocusScope { Item { id: mainBackground + // visible when in the overview 'grid' mode, but also keep neighbouring items visible as they can appear during gestures visible: gridVal > 0 || nearCurrent + // Avoid handling drops for offscreen visible items + enabled: gridVal > 0 || current + anchors.fill: parent property bool shouldBeVisibleInOverview: !(effect.searchText.length > 0 && current) || (heap.count !== 0 && effect.filterWindows) opacity: 1 - overviewVal * (shouldBeVisibleInOverview ? 0 : 1) @@ -566,6 +570,7 @@ FocusScope { if (!mainBackground.contains(mainBackground.mapFromItem(null, pos.x, pos.y))) { return; } + // moving the window to the client screen is handled by WindowHeap's similiarly named function that is also run item.client.desktops = [mainBackground.desktop]; } }