Skip to content

Commit f0728ff

Browse files
committed
fix: tray plugin can not drag
as title Log: as title pms: BUG-293871
1 parent 2ded4b6 commit f0728ff

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

panels/dock/tray/package/TrayContainer.qml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ Item {
143143
keys: ["text/x-dde-shell-tray-dnd-surfaceId"]
144144
onEntered: function (dragEvent) {
145145
let surfaceId = dragEvent.getDataAsString("text/x-dde-shell-tray-dnd-surfaceId")
146-
console.log(surfaceId)
147-
if (DDT.TraySortOrderModel.isDisplayedSurface(surfaceId)) {
146+
let source = dragEvent.getDataAsString("text/x-dde-shell-tray-dnd-source")
147+
console.log(surfaceId, source)
148+
if (source !== "" && DDT.TraySortOrderModel.isDisplayedSurface(surfaceId)) {
148149
dragEvent.accepted = false
149150
} else {
150151
dragEvent.accepted = true

panels/dock/tray/quickpanel/DragItem.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Item {
2222
Component.onCompleted: {
2323
dragItem.Drag.mimeData = Qt.binding(function () {
2424
return {
25-
"text/x-dde-shell-tray-dnd-surfaceId": root.dragTextData
25+
"text/x-dde-shell-tray-dnd-surfaceId": root.dragTextData,
26+
"text/x-dde-shell-tray-dnd-source": "quickPanel"
2627
}
2728
})
2829
dragItem.Drag.dragType = Drag.Automatic

0 commit comments

Comments
 (0)