--- zenity-2.8.2.orig/src/util.c 2004-12-07 20:49:41.000000000 +0000 +++ zenity-2.8.2/src/util.c 2004-12-21 10:37:52.000000000 +0000 @@ -275,8 +275,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; }