diff -r ccb7bc7113a4 widget/src/gtk2/nsWindow.cpp --- a/widget/src/gtk2/nsWindow.cpp Sat Feb 21 12:05:27 2009 -0800 +++ b/widget/src/gtk2/nsWindow.cpp Sat Feb 21 16:47:24 2009 -0400 @@ -118,6 +118,15 @@ #ifdef MOZ_X11 #include "gfxXlibSurface.h" #endif + +#define MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_HILDON +#include "nsIGConfService.h" +static const char sWidgetCompletionGConfPref [] = + "/apps/osso/inputmethod/hildon-im-languages/en_GB/word-completion"; +static PRBool gWidgetCompletionEnabled = PR_FALSE; +#endif +#undef MOZ_PLATFORM_HILDON #ifdef MOZ_DFB extern "C" { @@ -2800,7 +2809,7 @@ DispatchEvent(&event, status); mLastMotionPressure = pressure; } - +#define MOZ_PLATFORM_HILDON void nsWindow::OnContainerFocusInEvent(GtkWidget *aWidget, GdkEventFocus *aEvent) { @@ -2813,9 +2822,24 @@ return; } - if (mIsTopLevel) + if (mIsTopLevel) { mActivatePending = PR_TRUE; - +#ifdef MOZ_PLATFORM_HILDON + if(mWindowType == eWindowType_toplevel) { + if(nsCOMPtr gConf = do_GetService(NS_GCONFSERVICE_CONTRACTID)) { + + PRBool state; + nsresult rv; + rv = gConf->GetBool(nsDependentCString(sWidgetCompletionGConfPref), &state); + if (NS_SUCCEEDED(rv)) + gWidgetCompletionEnabled = state; + + if(state) + gConf->SetBool(nsDependentCString(sWidgetCompletionGConfPref), PR_FALSE); + } + } +#endif + } // Unset the urgency hint, if possible GtkWidget* top_window = nsnull; GetToplevelWidget(&top_window); @@ -2854,6 +2878,11 @@ if (!gFocusWindow) return; +#ifdef MOZ_PLATFORM_HILDON + if (mIsTopLevel && mWindowType == eWindowType_toplevel) + if(nsCOMPtr gConf = do_GetService(NS_GCONFSERVICE_CONTRACTID)) + gConf->SetBool(nsDependentCString(sWidgetCompletionGConfPref), gWidgetCompletionEnabled); +#endif GdkWindow *tmpWindow; tmpWindow = (GdkWindow *)gFocusWindow->GetNativeData(NS_NATIVE_WINDOW); nsWindow *tmpnsWindow = get_window_for_gdk_window(tmpWindow); @@ -2895,7 +2924,7 @@ LOGFOCUS(("Done with container focus out [%p]\n", (void *)this)); } - +#undef MOZ_PLATFORM_HILDON PRBool nsWindow::DispatchCommandEvent(nsIAtom* aCommand) {