aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2007-07-13 09:08:13 +0000
committerRoss Burton <ross@linux.intel.com>2007-07-13 09:08:13 +0000
commit2faee03a9eb8d461225660ff3985b9e98374c17b (patch)
tree702a7dfba7f80f09a4b6633f327f4819fb8be70f
parenta59889764a56d8ef52f4fff8408277e1345b1cb7 (diff)
downloadlibowl-2faee03a9eb8d461225660ff3985b9e98374c17b.tar.gz
libowl-2faee03a9eb8d461225660ff3985b9e98374c17b.tar.bz2
libowl-2faee03a9eb8d461225660ff3985b9e98374c17b.zip
2007-07-13 Ross Burton <ross@openedhand.com>
* libowl/owlwindowmenu.c: Realize the window if it isn't already, as we need an X connection.
-rw-r--r--ChangeLog6
-rw-r--r--libowl/owlwindowmenu.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c66e5c..f41143f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-07-13 Ross Burton <ross@openedhand.com>
+ * libowl/owlwindowmenu.c:
+ Realize the window if it isn't already, as we need an X
+ connection.
+
+2007-07-13 Ross Burton <ross@openedhand.com>
+
* libowl/owlwindowmenu.h:
Add missing prototype.
diff --git a/libowl/owlwindowmenu.c b/libowl/owlwindowmenu.c
index a00e09e..fbe9748 100644
--- a/libowl/owlwindowmenu.c
+++ b/libowl/owlwindowmenu.c
@@ -138,8 +138,12 @@ owl_set_window_menu (GtkWindow *window, GtkMenu *menu)
/* TODO: allow NULL menu to unset? */
g_return_if_fail (GTK_IS_MENU (menu));
+ /* Realize the window if it isn't already, as we need an X connection */
+ if (!GTK_WIDGET_REALIZED (window))
+ gtk_widget_realize (GTK_WIDGET (window));
+
w = GTK_WIDGET (window)->window;
-
+
/* Make sure the atoms we need are defined */
ensure_atoms (w);