From 1a1d4a8c606b55bf2d2695e60f1ac851d3698303 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 21 Dec 2004 10:35:58 +0000 Subject: Add patch to fix invalid window IDs --- debian/patches/window-valid.diff | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 debian/patches/window-valid.diff (limited to 'debian/patches') diff --git a/debian/patches/window-valid.diff b/debian/patches/window-valid.diff new file mode 100644 index 00000000..6f6b0fd1 --- /dev/null +++ b/debian/patches/window-valid.diff @@ -0,0 +1,25 @@ +=================================================================== +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; + } -- cgit