From b577dd762d300ff4385a9fb848ac291f78bbaa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 5 Aug 2021 22:29:23 +0200 Subject: [PATCH] Fix D&D on GTK 4.3.2+ --- src/widget.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widget.js b/src/widget.js index 4c6fcc1c..dbe40443 100644 --- a/src/widget.js +++ b/src/widget.js @@ -1013,8 +1013,10 @@ class ClapperWidget extends Gtk.Grid for(let index in files) files[index] = Gio.File.new_for_uri(files[index]); + /* TODO: remove GTK < 4.3.2 compat someday */ + const currentDrop = dropTarget.current_drop || dropTarget.drop; const app = this.root.application; - app.isFileAppend = Boolean(dropTarget.drop.actions & Gdk.DragAction.COPY); + app.isFileAppend = Boolean(currentDrop.actions & Gdk.DragAction.COPY); app.open(files, ""); return true;