summaryrefslogtreecommitdiff
path: root/libjava/jni
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/jni')
-rw-r--r--libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
index 742550f8ef2..4d808e366bd 100644
--- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
+++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
@@ -190,11 +190,8 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectJObject
children = gtk_container_get_children(GTK_CONTAINER(ptr));
vbox = children->data;
+ g_assert (GTK_IS_VBOX(vbox));
- if(!GTK_IS_VBOX(vbox))
- {
- printf("*** this is not a vbox\n");
- }
children = gtk_container_get_children(GTK_CONTAINER(vbox));
do
{
@@ -202,11 +199,7 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectJObject
children = children->next;
}
while (!GTK_IS_LAYOUT (layout) && children != NULL);
-
- if(!GTK_IS_LAYOUT(layout))
- {
- printf("*** widget is not a layout ***");
- }
+ g_assert (GTK_IS_LAYOUT(layout));
gtk_widget_realize (layout);
@@ -216,9 +209,6 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectJObject
connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window);
- g_signal_connect (G_OBJECT (ptr), "property-notify-event",
- G_CALLBACK (window_property_changed_cb), obj);
-
gdk_threads_leave ();
}
@@ -239,10 +229,16 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals
/* Receive events from the GtkLayout too */
children = gtk_container_get_children(GTK_CONTAINER(ptr));
vbox = children->data;
- g_assert(GTK_IS_VBOX(vbox));
+ g_assert (GTK_IS_VBOX (vbox));
+
children = gtk_container_get_children(GTK_CONTAINER(vbox));
- layout = children->data;
- g_assert(GTK_IS_LAYOUT(layout));
+ do
+ {
+ layout = children->data;
+ children = children->next;
+ }
+ while (!GTK_IS_LAYOUT (layout) && children != NULL);
+ g_assert (GTK_IS_LAYOUT (layout));
g_signal_connect (GTK_OBJECT (layout), "event",
G_CALLBACK (pre_event_handler), *gref);
@@ -266,6 +262,9 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals
g_signal_connect (G_OBJECT (ptr), "window-state-event",
G_CALLBACK (window_window_state_cb), *gref);
+ g_signal_connect (G_OBJECT (ptr), "property-notify-event",
+ G_CALLBACK (window_property_changed_cb), *gref);
+
gdk_threads_leave ();
/* Connect the superclass signals. */