Dear all,
Seems that there's a bug with IME in embedded browser with
mozilla such as Galeon.
I'm trying on kinput2, it works with those all text fields of
Galeon (including address bar and configuration fields). However all
input fields within the webpage (ie the embed mozilla) doesn't work.
(Mozilla works with all those btw...)
I've been tracing the code and for some reasons, the
nsWidget::IMEGetShellWidget, which calls GetShellWidget, fails. The
GetShellWidget basically running a loop to look for the shell/root
window.
The function looks like this:
static nsWidget *
GetShellWidget(GdkWindow *gdkWindow)
{
GdkWindow *parent = gdk_window_get_parent(gdkWindow);
nsWidget *root_win = nsnull;
gpointer data;
while (parent) {
gdk_window_get_user_data(parent, &data);
if (GTK_IS_OBJECT(data)) {
root_win = (nsWidget *) gtk_object_get_data(GTK_OBJECT(data),
"nsWindow");
if(root_win && root_win->mIsToplevel == PR_TRUE){
return root_win;
}
}
parent = gdk_window_get_parent(parent);
}
return nsnull;
}
I'm not sure what gtk_object_get_data(GTK_OBJECT(data),
"nsWindow") means. As far as I know nsWindow is from the mozilla source,
does that mean it it's looking for the object/window with the key
nsWindow, which is not in Galeon? Will this be a problem while embedding
mozilla browser?
I'm not familiar with gtk/gdk stuffs, and so I'm not sure how
they work...
Any advice/help will be appreciated.
BTW the version of mozilla is 0.8.1, I've tried with 0.9 and the cvs
checkout as well and it has the same problems.
Thanks a lot.
Pigeon.