[gnome-packagekit/gnome-3-0] Only use the window title if the user set a parent window XID. Fixes rh#700229



commit 65c6d5df07a595ce86cf4aced96207062d846dca
Author: Richard Hughes <richard hughsie com>
Date:   Wed May 18 13:21:13 2011 +0100

    Only use the window title if the user set a parent window XID. Fixes rh#700229
    
    I have no idea why GTK has started to crash when we pass it an invalid window,
    but it's probably not a good idea to rely on the broken functionality.

 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 8377e2e..e9de1e3 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -3000,7 +3000,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]