Hi,
I’m working on GTK3 application in cpp. I’m trying to implement Drag and Drop for GTKLabel. I tried drag and drop for GTKEntry and GTKButton, for these i was able to get “Drag-Begin”, “Drag-motion” and “Drag-Drop” events,but im not able to get these events for GTKLabel
GtkTargetEntry gten[1] = { g_strdup("dummy"), GTK_TARGET_SAME_APP, (guint)pID };
gtk_drag_source_set(widget, GDK_BUTTON1_MASK, gten, 1, GDK_ACTION_COPY);gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, gten, 1, GDK_ACTION_COPY);
g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(ButtonClickHandler), nullptr);
g_signal_connect(G_OBJECT(widget), "drag-begin", G_CALLBACK(ButtonDragBeginHandler), nullptr);
g_signal_connect(G_OBJECT(widget), "drag-drop", G_CALLBACK(ButtonDragDropHandler), nullptr);
g_signal_connect(G_OBJECT(widget), "drag-motion", G_CALLBACK(ButtonDragMotionHandler), nullptr);
Same set of code worked for GTKEntry and GTKButton, but it did not work for GTKLabel.
How to fix this issue?
Thank you,
Harshithraj P