diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 4 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.h | 4 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 20 |
5 files changed, 23 insertions, 28 deletions
@@ -1,3 +1,12 @@ +2005-08-27 Christian Persch <chpe@cvs.gnome.org> + + * configure.ac: + * embed/mozilla/EphyBrowser.cpp: + * embed/mozilla/EphyBrowser.h: + * embed/mozilla/mozilla-embed.cpp: + + The focus fix isn't needed anymore for gecko >= 1.8. + 2005-08-27 Crispin Flowerday <gnome@flowerday.cx> * configure.ac: diff --git a/configure.ac b/configure.ac index 6f7c5a6c8..28ec189f3 100644 --- a/configure.ac +++ b/configure.ac @@ -435,20 +435,6 @@ CXXFLAGS=$_SAVE_CXXFLAGS AC_LANG_POP([C++]) -dnl Broken everywhere -dnl Provide a configure switch for easy testing of *real* fixes in gtkmozembed - -AC_MSG_CHECKING([whether to work around broken gtkmozembed focus]) -AC_ARG_ENABLE([focus-fix], - AS_HELP_STRING([focus-fix],[Enable the workaround for the broken GtkMozEmbed focus handling (default: enabled)]), - [want_focus_fix=$enableval], - [want_focus_fix=yes]) -AC_MSG_RESULT([$want_focus_fix]) - -if test "x$want_focus_fix" = "xyes"; then - AC_DEFINE([GTKMOZEMBED_BROKEN_FOCUS],[1],[Define if GtkMozEmbed has broken focus handling]) -fi - dnl Needed since 1.8b2 dnl Define this down here so it doesn't affect the API checks above diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index c0087a625..e7e04f2f7 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -1329,7 +1329,7 @@ EphyBrowser::GetDocumentType () return type; } -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 nsresult EphyBrowser::FocusActivate () { @@ -1345,4 +1345,4 @@ EphyBrowser::FocusDeactivate () return mWebBrowserFocus->Deactivate(); } -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h index a4a0de502..3b4fb2284 100644 --- a/embed/mozilla/EphyBrowser.h +++ b/embed/mozilla/EphyBrowser.h @@ -179,10 +179,10 @@ public: EphyEmbedDocumentType GetDocumentType (); -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 nsresult FocusActivate (); nsresult FocusDeactivate (); -#endif +#endif /* !HAVE_GECKO_1_8 */ nsCOMPtr<nsIWebBrowser> mWebBrowser; private: diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 461bbf002..e692c590e 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -91,19 +91,19 @@ struct MozillaEmbedPrivate { EphyBrowser *browser; MozillaEmbedLoadState load_state; -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 guint focus_connected : 1; -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ }; #define WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1" static GObjectClass *parent_class = NULL; -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 static guint fiesid = 0; static guint foesid = 0; -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ static void impl_manager_do_command (EphyCommandManager *manager, @@ -200,7 +200,7 @@ mozilla_embed_grab_focus (GtkWidget *widget) } } -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 static gboolean child_focus_in_event_cb (GtkWidget *child, GdkEventFocus *event, @@ -220,7 +220,7 @@ child_focus_out_event_cb (GtkWidget *child, return FALSE; } -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ static void mozilla_embed_realize (GtkWidget *widget) @@ -238,7 +238,7 @@ mozilla_embed_realize (GtkWidget *widget) return; } -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 /* HACK ALERT! This depends highly on undocumented interna of * GtkMozEmbed! * @@ -290,7 +290,7 @@ mozilla_embed_realize (GtkWidget *widget) G_CONNECT_AFTER); mpriv->focus_connected = TRUE; -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ } static GObject * @@ -323,10 +323,10 @@ mozilla_embed_class_init (MozillaEmbedClass *klass) widget_class->grab_focus = mozilla_embed_grab_focus; widget_class->realize = mozilla_embed_realize; -#ifdef GTKMOZEMBED_BROKEN_FOCUS +#ifndef HAVE_GECKO_1_8 fiesid = g_signal_lookup ("focus-in-event", GTK_TYPE_WIDGET); foesid = g_signal_lookup ("focus-out-event", GTK_TYPE_WIDGET); -#endif /* GTKMOZEMBED_BROKEN_FOCUS */ +#endif /* !HAVE_GECKO_1_8 */ g_type_class_add_private (object_class, sizeof(MozillaEmbedPrivate)); } |