diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 28 |
2 files changed, 27 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2005-08-07 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/mozilla-embed.cpp: (mozilla_embed_realize): + + Also block GtkMozEmbed's child focus-[in|out]-event handlers. + 2005-08-06 Crispin Flowerday <gnome@flowerday.cx> * embed/mozilla/EphyBrowser.cpp (AttachListeners): diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index d925ac0fa..80aa77d26 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -257,22 +257,36 @@ mozilla_embed_realize (GtkWidget *widget) guint n; n = g_signal_handlers_block_matched (toplevel, - (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), - fiesid, 0, NULL, NULL, data); + (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), + fiesid, 0, NULL, NULL, data); n += g_signal_handlers_block_matched (toplevel, - (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), - foesid, 0, NULL, NULL, data); + (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), + foesid, 0, NULL, NULL, data); if (n != 2) { - g_warning ("Unexpected (n=%d) focus handlers found!\n", n); + g_warning ("Unexpected number (n=%d) of toplevel focus handlers found!\n", n); } if (mpriv->focus_connected) return; - g_signal_connect_object (bin->child, "focus-in-event", + GtkWidget *child = gtk_bin_get_child (bin); + g_return_if_fail (child != NULL); + + n = g_signal_handlers_block_matched (child, + (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), + fiesid, 0, NULL, NULL, widget); + n += g_signal_handlers_block_matched (child, + (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), + foesid, 0, NULL, NULL, widget); + if (n != 2) + { + g_warning ("Unexpected number (n=%d) of child focus handlers found!\n", n); + } + + g_signal_connect_object (child, "focus-in-event", G_CALLBACK (child_focus_in_event_cb), widget, G_CONNECT_AFTER); - g_signal_connect_object (bin->child, "focus-out-event", + g_signal_connect_object (child, "focus-out-event", G_CALLBACK (child_focus_out_event_cb), widget, G_CONNECT_AFTER); |