X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=gtk-gui.c;h=c78d7e6677feeadabf850c738f2450dfc5132884;hb=d906c82f31c5406b6debe0df88cb49b916cd6ced;hp=339b13f4c37c67cbec6681525425d261700f8fe3;hpb=3c69c9b935ea43402bafd2918e2e71e561b4484d;p=ext%2Fsubsurface.git diff --git a/gtk-gui.c b/gtk-gui.c index 339b13f..c78d7e6 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -694,23 +694,21 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source, return GTK_NOTEBOOK(notebook); } -static void drag_cb(GtkWidget *widget, GdkDragContext *context, +static gboolean drag_cb(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data) { GtkWidget *source; notebook_data_t *nbdp; + gtk_drag_finish(context, TRUE, TRUE, time); source = gtk_drag_get_source_widget(context); if (nbd[0].name && ! strcmp(nbd[0].name,gtk_widget_get_name(source))) nbdp = nbd; else if (nbd[1].name && ! strcmp(nbd[1].name,gtk_widget_get_name(source))) nbdp = nbd + 1; - else - /* HU? */ - return; - - gtk_drag_finish(context, TRUE, TRUE, time); + else /* just on ourselves */ + return TRUE; /* we no longer need the widget - but getting rid of this is hard; * remove the signal handler, remove the notebook from the box @@ -722,6 +720,8 @@ static void drag_cb(GtkWidget *widget, GdkDragContext *context, nbdp->widget = NULL; free(nbdp->name); nbdp->name = NULL; + + return TRUE; } #ifdef WIN32