Merge branch 'master' into tizen_2.1
[platform/core/appfw/app-core.git] / src / appcore-X.c
index 2a2e6fb..8595860 100755 (executable)
@@ -44,9 +44,16 @@ static pid_t __get_win_pid(Display *d, Window win)
        unsigned long nitems;
        unsigned long bytes_after;
        unsigned char *prop_ret;
+       XWindowAttributes attr;
 
        _retv_if(d == NULL || !a_pid, -1);
 
+       if (!XGetWindowAttributes(d, win, &attr))
+               return -1;
+
+       if (attr.override_redirect || attr.class == InputOnly)
+               return -1;
+
        prop_ret = NULL;
        r = XGetWindowProperty(d, win, a_pid, 0, 1, False, XA_CARDINAL,
                               &a_type, &format, &nitems, &bytes_after,