From 201eebe4ec2ea208128e53be986f6d8391b408ce Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Mon, 8 Nov 1999 22:34:41 +0000 Subject: [PATCH] add mozbox code git-svn-id: svn://10.0.0.236/branches/SUPERWIN@52965 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/gtk/nsTextWidget.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/mozilla/widget/src/gtk/nsTextWidget.cpp b/mozilla/widget/src/gtk/nsTextWidget.cpp index 1a2927d24e3..c35609de414 100644 --- a/mozilla/widget/src/gtk/nsTextWidget.cpp +++ b/mozilla/widget/src/gtk/nsTextWidget.cpp @@ -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; }