[gnome-color-manager] Ensure the calibration dialog can be set modal



commit 558ee29fdcb2f8a8df305b31c3eeef221fde92ba
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 14 16:08:46 2011 +0100

    Ensure the calibration dialog can be set modal
    
    The main window has to be realized before gtk_widget_get_window() will work.

 src/gcm-calibrate-main.c |    2 ++
 src/gcm-viewer.c         |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
index a888b74..82deb8d 100644
--- a/src/gcm-calibrate-main.c
+++ b/src/gcm-calibrate-main.c
@@ -94,6 +94,8 @@ gcm_window_set_parent_xid (GtkWindow *window, guint32 xid)
 		g_warning ("failed to get parent window");
 		return;
 	}
+
+	gtk_widget_realize (GTK_WIDGET (window));
 	our_window = gtk_widget_get_window (GTK_WIDGET (window));
 	if (our_window == NULL) {
 		g_warning ("failed to get our window");
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 73527ab..bffccfc 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -508,6 +508,8 @@ gcm_window_set_parent_xid (GtkWindow *window, guint32 xid)
 		g_warning ("failed to get parent window");
 		return;
 	}
+
+	gtk_widget_realize (GTK_WIDGET (window));
 	our_window = gtk_widget_get_window (GTK_WIDGET (window));
 	if (our_window == NULL) {
 		g_warning ("failed to get our window");



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