Fix D&D on GTK 4.3.2+

This commit is contained in:
Rafał Dzięgiel
2021-08-05 22:29:23 +02:00
parent d798539dce
commit b577dd762d

View File

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