From f30955b63cd68d3fdc3527ceb7a64880dad4e91a Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Mon, 6 Apr 2026 20:37:13 +0200 Subject: [PATCH] debug: print drag-drop events to diagnose Wayland DnD --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 16f6972..0a3c7f3 100755 --- a/main.py +++ b/main.py @@ -1257,18 +1257,25 @@ class MainWindow(QMainWindow): # --- Mask generation --- def dragEnterEvent(self, event: QDragEnterEvent) -> None: + print("dragEnter formats:", event.mimeData().formats(), flush=True) if event.mimeData().hasUrls(): event.acceptProposedAction() + else: + event.ignore() def dragMoveEvent(self, event) -> None: if event.mimeData().hasUrls(): event.acceptProposedAction() + else: + event.ignore() def dropEvent(self, event: QDropEvent) -> None: + print("drop urls:", event.mimeData().urls(), flush=True) paths = [ u.toLocalFile() for u in event.mimeData().urls() if os.path.isfile(u.toLocalFile()) ] + print("drop paths:", paths, flush=True) if paths: self._playlist.add_files(paths)