[evolution/gnome-3-20] Bug 767283 - "Add a Column" dialog: drag and drop broken on Wayland
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-20] Bug 767283 - "Add a Column" dialog: drag and drop broken on Wayland
- Date: Mon, 6 Jun 2016 10:55:00 +0000 (UTC)
commit 01104dc2dcc9b6a12b0309114fd6bbbe5cf843f3
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 6 12:53:15 2016 +0200
Bug 767283 - "Add a Column" dialog: drag and drop broken on Wayland
e-util/e-table-header-item.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-table-header-item.c b/e-util/e-table-header-item.c
index 8557f62..91c7430 100644
--- a/e-util/e-table-header-item.c
+++ b/e-util/e-table-header-item.c
@@ -714,20 +714,29 @@ ethi_drag_motion (GtkWidget *widget,
{
GtkAllocation allocation;
GtkAdjustment *adjustment;
- GList *targets;
+ GList *targets, *link;
gdouble hadjustment_value;
gdouble vadjustment_value;
- gchar *droptype, *headertype;
+ gchar *headertype;
guint direction = 0;
gdk_drag_status (context, 0, time);
+ headertype = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
targets = gdk_drag_context_list_targets (context);
- droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (targets->data));
- headertype = g_strdup_printf (
- "%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
+ for (link = targets; link; link = g_list_next (link)) {
+ gchar *droptype;
- if (strcmp (droptype, headertype) != 0) {
+ droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (link->data));
+ if (g_strcmp0 (droptype, headertype) == 0) {
+ g_free (droptype);
+ break;
+ }
+
+ g_free (droptype);
+ }
+
+ if (!link) {
g_free (headertype);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]