[gcompris/gcomprixogoo] This version of drag does work even if the user is dragging a goocanvas group
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] This version of drag does work even if the user is dragging a goocanvas group
- Date: Mon, 23 Nov 2009 01:11:08 +0000 (UTC)
commit aabdccea4831e102dc999f6b958b3c540fd2cd9d
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Mon Nov 23 02:01:17 2009 +0100
This version of drag does work even if the user is dragging a goocanvas group
instead of a regular item.
I hope I did not broke anything.
src/gcompris/drag.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gcompris/drag.c b/src/gcompris/drag.c
index 8f8d805..b8bd689 100644
--- a/src/gcompris/drag.c
+++ b/src/gcompris/drag.c
@@ -111,7 +111,7 @@ gc_drag_event (GooCanvasItem *item,
case GDK_BUTTON_PRESS:
if(gc_drag_status == 0 && event->button == 1)
{
- gc_drag_item = target;
+ gc_drag_item = item;
if(gc_drag_mode == GC_DRAG_MODE_GRAB)
gc_drag_status = 2;
else
@@ -125,7 +125,7 @@ gc_drag_event (GooCanvasItem *item,
if(gc_drag_status == 2)
{
gc_drag_func(gc_drag_item,
- target,
+ item,
(GdkEvent*)event,
data);
gc_drag_status = 0;
@@ -147,9 +147,6 @@ gc_drag_event_root(GooCanvasItem * item,
GdkEventMotion *event,
gpointer data)
{
- if(gc_drag_item != target)
- return FALSE;
-
switch(event->type)
{
case GDK_MOTION_NOTIFY:
@@ -157,8 +154,9 @@ gc_drag_event_root(GooCanvasItem * item,
{
if(gc_drag_status==1 && gc_drag_mode & GC_DRAG_MODE_GRAB)
gc_drag_status=2;
+
gc_drag_func(gc_drag_item,
- target,
+ item,
(GdkEvent*)event,
gc_drag_user_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]