add mozbox code

git-svn-id: svn://10.0.0.236/branches/SUPERWIN@52965 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%redhat.com
1999-11-08 22:34:41 +00:00
parent 91802fc4cb
commit 201eebe4ec

View File

@@ -60,6 +60,19 @@ NS_IMETHODIMP nsTextWidget::CreateNative(GtkObject *parentWindow)
PRBool oldIsReadOnly;
mWidget = gtk_entry_new();
#ifdef USE_SUPERWIN
if (!GDK_IS_SUPERWIN(parentWindow)) {
g_print("Damn, brother. That's not a superwin.\n");
return NS_ERROR_FAILURE;
}
GdkSuperWin *superwin = GDK_SUPERWIN(parentWindow);
mMozBox = gtk_mozbox_new(superwin->bin_window);
#endif /* USE_SUPERWIN */
// used by nsTextHelper because nsTextArea needs a scrolled_window
mTextWidget = mWidget;
@@ -93,6 +106,14 @@ NS_IMETHODIMP nsTextWidget::CreateNative(GtkObject *parentWindow)
GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK);
#ifdef USE_SUPERWIN
// make sure that we put the scrollbar into the mozbox
gtk_container_add(GTK_CONTAINER(mMozBox), mWidget);
#endif /* USE_SUPERWIN */
return NS_OK;
}