17827
|
1 |
--- zenity-2.30.0.orig/src/util.c 2009-08-08 10:34:41.000000000 +0100
|
|
2 |
+++ zenity-2.30.0/src/util.c 2010-04-12 17:05:54.216311376 +0100
|
|
3 |
@@ -323,13 +323,12 @@
|
|
4 |
const char *wid_str = g_getenv ("WINDOWID");
|
|
5 |
if (wid_str) {
|
|
6 |
char *wid_str_end;
|
|
7 |
+ int ret;
|
|
8 |
Window wid = strtoul (wid_str, &wid_str_end, 10);
|
|
9 |
if (*wid_str != '\0' && *wid_str_end == '\0' && wid != 0) {
|
|
10 |
XWindowAttributes attrs;
|
|
11 |
- gdk_error_trap_push ();
|
|
12 |
- XGetWindowAttributes (GDK_DISPLAY(), wid, &attrs);
|
|
13 |
- gdk_flush();
|
|
14 |
- if (gdk_error_trap_pop () != 0) {
|
|
15 |
+ ret = XGetWindowAttributes (GDK_DISPLAY(), wid, &attrs);
|
|
16 |
+ if (ret == 0) {
|
|
17 |
return None;
|
|
18 |
}
|
|
19 |
return wid;
|