aboutsummaryrefslogtreecommitdiffstats
path: root/xdnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xdnd.c')
-rw-r--r--xdnd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xdnd.c b/xdnd.c
index 978d7ae..f506f47 100644
--- a/xdnd.c
+++ b/xdnd.c
@@ -126,7 +126,8 @@ find_window(Widget widget, int wx, int wy, int rx, int ry)
nchildren = 0;
XtVaGetValues(widget,XtNchildren,&children,
XtNnumChildren,&nchildren,NULL);
- fprintf(stderr,"findwindow %s\n",XtName(widget));
+ if (xdnd_debug)
+ fprintf(stderr,"findwindow %s\n",XtName(widget));
for (i = nchildren-1; i >= 0; i--) {
XtVaGetValues(children[i],XtNx,&x,XtNy,&y,
XtNwidth,&w,XtNheight,&h,NULL);
@@ -142,10 +143,12 @@ find_window(Widget widget, int wx, int wy, int rx, int ry)
break;
}
if (found) {
- fprintf(stderr," more: %s\n",XtName(found));
+ if (xdnd_debug)
+ fprintf(stderr," more: %s\n",XtName(found));
return find_window(found,wx+x,wy+y,rx,ry);
}
- fprintf(stderr," done: %s\n",XtName(widget));
+ if (xdnd_debug)
+ fprintf(stderr," done: %s\n",XtName(widget));
return widget;
}