Commit acb95ed9 authored by Elliot Lee's avatar Elliot Lee
Browse files

a little more debugging code.

parent c36ca76b
...@@ -3163,6 +3163,9 @@ static void ...@@ -3163,6 +3163,9 @@ static void
gdk_dnd_drag_begin (GdkWindow *initial_window) gdk_dnd_drag_begin (GdkWindow *initial_window)
{ {
GdkEventDragBegin tev; GdkEventDragBegin tev;
GDK_NOTE(DND, g_print("------- STARTING DRAG from %p\n", initial_window));
tev.type = GDK_DRAG_BEGIN; tev.type = GDK_DRAG_BEGIN;
tev.window = initial_window; tev.window = initial_window;
tev.u.allflags = 0; tev.u.allflags = 0;
......
...@@ -98,6 +98,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, ...@@ -98,6 +98,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok,
{ {
gdk_window_hide(gdk_dnd.c->drag_pm_ok); gdk_window_hide(gdk_dnd.c->drag_pm_ok);
gdk_window_hide(gdk_dnd.c->drag_pm_default); gdk_window_hide(gdk_dnd.c->drag_pm_default);
GDK_NOTE(DND, g_print("Hiding both drag cursors\n"));
return; return;
} }
...@@ -107,18 +108,22 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, ...@@ -107,18 +108,22 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok,
if(drag_ok) if(drag_ok)
{ {
GDK_NOTE(DND, g_print("Switching to drag_ok cursor\n"));
mypix = gdk_dnd.c->drag_pm_ok; mypix = gdk_dnd.c->drag_pm_ok;
opix = gdk_dnd.c->drag_pm_default; opix = gdk_dnd.c->drag_pm_default;
myhotspot = &gdk_dnd.c->ok_hotspot; myhotspot = &gdk_dnd.c->ok_hotspot;
} }
else else
{ {
GDK_NOTE(DND, g_print("Switching to drag_default cursor\n"));
mypix = gdk_dnd.c->drag_pm_default; mypix = gdk_dnd.c->drag_pm_default;
opix = gdk_dnd.c->drag_pm_ok; opix = gdk_dnd.c->drag_pm_ok;
myhotspot = &gdk_dnd.c->default_hotspot; myhotspot = &gdk_dnd.c->default_hotspot;
} }
gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y);
if(change_made) if(change_made)
{ {
GDK_NOTE(DND, g_print("Cursors switched, hide & show\n"));
gdk_window_hide(opix); gdk_window_hide(opix);
} }
gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y); gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y);
......
...@@ -98,6 +98,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, ...@@ -98,6 +98,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok,
{ {
gdk_window_hide(gdk_dnd.c->drag_pm_ok); gdk_window_hide(gdk_dnd.c->drag_pm_ok);
gdk_window_hide(gdk_dnd.c->drag_pm_default); gdk_window_hide(gdk_dnd.c->drag_pm_default);
GDK_NOTE(DND, g_print("Hiding both drag cursors\n"));
return; return;
} }
...@@ -107,18 +108,22 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, ...@@ -107,18 +108,22 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok,
if(drag_ok) if(drag_ok)
{ {
GDK_NOTE(DND, g_print("Switching to drag_ok cursor\n"));
mypix = gdk_dnd.c->drag_pm_ok; mypix = gdk_dnd.c->drag_pm_ok;
opix = gdk_dnd.c->drag_pm_default; opix = gdk_dnd.c->drag_pm_default;
myhotspot = &gdk_dnd.c->ok_hotspot; myhotspot = &gdk_dnd.c->ok_hotspot;
} }
else else
{ {
GDK_NOTE(DND, g_print("Switching to drag_default cursor\n"));
mypix = gdk_dnd.c->drag_pm_default; mypix = gdk_dnd.c->drag_pm_default;
opix = gdk_dnd.c->drag_pm_ok; opix = gdk_dnd.c->drag_pm_ok;
myhotspot = &gdk_dnd.c->default_hotspot; myhotspot = &gdk_dnd.c->default_hotspot;
} }
gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y);
if(change_made) if(change_made)
{ {
GDK_NOTE(DND, g_print("Cursors switched, hide & show\n"));
gdk_window_hide(opix); gdk_window_hide(opix);
} }
gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y); gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y);
......
...@@ -3163,6 +3163,9 @@ static void ...@@ -3163,6 +3163,9 @@ static void
gdk_dnd_drag_begin (GdkWindow *initial_window) gdk_dnd_drag_begin (GdkWindow *initial_window)
{ {
GdkEventDragBegin tev; GdkEventDragBegin tev;
GDK_NOTE(DND, g_print("------- STARTING DRAG from %p\n", initial_window));
tev.type = GDK_DRAG_BEGIN; tev.type = GDK_DRAG_BEGIN;
tev.window = initial_window; tev.window = initial_window;
tev.u.allflags = 0; tev.u.allflags = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment