diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-08-07 05:10:42 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-08-14 07:12:52 -0400 |
commit | 030b62d122d825c3f043116bca29dd6cc7896210 (patch) | |
tree | 4c6a293dbbcac954cf9fe99f9d8408c1185c4843 /gtk/gtknotebook.c | |
parent | e80d1f0523d8e47deff687b3aa6877a152507d0d (diff) | |
download | gtk+-030b62d122d825c3f043116bca29dd6cc7896210.tar.gz |
gtkdnd: Introduce a new API for more accurate drag origin data
When trying to drag, we currently the position of the first motion
event to determine where the drag came from. This might be alright
in the case of the old animation, but the data will be inaccurate
if the user has moved the pointer quite a bit since pressing the
cursor to start dragging. While we could monkey patch the GdkEvent
at the widget layer, this is unintuitive and strange.
Add a new API that takes a set of pointer coordinates describing
the origin of the drag. Additionally, adapt most widgets to use
it and use it with correct coordinates.
https://bugzilla.gnome.org/show_bug.cgi?id=705605
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index b44c84aac6..48a0580296 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3415,8 +3415,9 @@ gtk_notebook_motion_notify (GtkWidget *widget, priv->detached_tab = priv->cur_page; priv->during_detach = TRUE; - gtk_drag_begin (widget, priv->source_targets, GDK_ACTION_MOVE, - priv->pressed_button, (GdkEvent*) event); + gtk_drag_begin_with_coordinates (widget, priv->source_targets, GDK_ACTION_MOVE, + priv->pressed_button, (GdkEvent*) event, + priv->drag_begin_x, priv->drag_begin_y); return TRUE; } |