diff -Nur mozilla-bak/widget/src/gtk2/nsWindow.cpp mozilla/widget/src/gtk2/nsWindow.cpp --- mozilla-bak/widget/src/gtk2/nsWindow.cpp 2004-06-11 00:02:36.000000000 +0900 +++ mozilla/widget/src/gtk2/nsWindow.cpp 2004-11-01 23:54:26.949435256 +0900 @@ -3929,6 +3929,22 @@ nsEventStatus status; DispatchEvent(&compEvent, status); + + GtkWidget *widget = + get_gtk_widget_for_gdk_window(this->mDrawingarea->inner_window); + GdkWindow *win = this->mDrawingarea->inner_window; + + gint x1, y1, x2, y2; + gdk_window_get_origin(widget->window, &x1, &y1); + gdk_window_get_origin(win, &x2, &y2); + + GdkRectangle area; + area.x = compEvent.theReply.mCursorPosition.x + (unsigned int) (x2 - x1); + area.y = compEvent.theReply.mCursorPosition.y + (unsigned int) (y2 - y1); + area.width = 0; + area.height = compEvent.theReply.mCursorPosition.height; + + gtk_im_context_set_cursor_location(IMEGetContext(), &area); } void