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
This commit is contained in:
David Edmundson 2024-02-19 14:46:07 +00:00 committed by Vlad Zahorodnii
parent 64e701fdaf
commit 3ede995b27

View file

@ -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];
}
}