From d1779d07691ea722d5c39e010434c6f20405fcdc Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 20 Nov 2014 10:30:09 +0100 Subject: silence xdnd debug msgs --- xdnd.c | 9 ++++++--- 1 file 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; } -- cgit