forked from Shinonome/dots-hyprland
overview: make drag hotspot be at the mouse
This commit is contained in:
@@ -199,11 +199,13 @@ Item {
|
|||||||
onExited: hovered = false // For hover color change
|
onExited: hovered = false // For hover color change
|
||||||
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
|
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
|
||||||
drag.target: parent
|
drag.target: parent
|
||||||
onPressed: {
|
onPressed: (mouse) => {
|
||||||
root.draggingFromWorkspace = windowData?.workspace.id
|
root.draggingFromWorkspace = windowData?.workspace.id
|
||||||
window.pressed = true
|
window.pressed = true
|
||||||
window.Drag.active = true
|
window.Drag.active = true
|
||||||
window.Drag.source = window
|
window.Drag.source = window
|
||||||
|
window.Drag.hotSpot.x = mouse.x
|
||||||
|
window.Drag.hotSpot.y = mouse.y
|
||||||
// console.log(`[OverviewWindow] Dragging window ${windowData?.address} from position (${window.x}, ${window.y})`)
|
// console.log(`[OverviewWindow] Dragging window ${windowData?.address} from position (${window.x}, ${window.y})`)
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
|
|||||||
Reference in New Issue
Block a user