=================================================================== RCS file: /cvs/gnome/zenity/src/util.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- util.c 2004/10/05 03:44:52 1.14 +++ util.c 2004/11/23 10:08:50 1.15 @@ -272,8 +272,16 @@ if (wid_str) { char *wid_str_end; Window wid = strtoul (wid_str, &wid_str_end, 10); - if (*wid_str != '\0' && *wid_str_end == '\0' && wid != 0) + if (*wid_str != '\0' && *wid_str_end == '\0' && wid != 0) { + XWindowAttributes attrs; + gdk_error_trap_push (); + XGetWindowAttributes (GDK_DISPLAY(), wid, &attrs); + gdk_flush(); + if (gdk_error_trap_pop () != 0) { + return None; + } return wid; + } } return None; }