[gnome-packagekit/gnome-3-6] Be more careful when dealing with windows



commit 919415a16f3c0d8757aded57d3d5aa5a66998776
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 3 17:32:03 2013 -0500

    Be more careful when dealing with windows
    
    xids may be 0, and in that case, we don't have a window.
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gpk-dbus-task.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index fa611eb..28b3eed 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -3294,7 +3294,8 @@ gpk_dbus_task_set_exec (GpkDbusTask *dtask, const gchar *exec)
        dtask->priv->parent_icon_name = NULL;
 
        /* is the binary trusted, i.e. can we probe it's window properties */
-       if (gpk_dbus_task_path_is_trusted (exec)) {
+       if (gpk_dbus_task_path_is_trusted (exec) &&
+            dtask->priv->parent_window != NULL) {
                g_debug ("using application window properties");
                /* get from window properties */
                x11 = gpk_x11_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]