blob: 574e6bea6029cdb9cdbe66e8ac71fbe6e7a7e6f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- 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;
}
|