* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* GtkLayout: Widget for scrolling of arbitrary-sized areas.
*
#include "gdk/gdk.h"
-#include "gtkprivate.h"
+#include "gtkadjustment.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
+#include "gtkprivate.h"
#include "gtkscrollable.h"
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
- gdk_window_set_user_data (window, widget);
+ gtk_widget_register_window (widget, window);
gtk_widget_get_allocation (widget, &allocation);
attributes.y = - gtk_adjustment_get_value (priv->vadjustment);
attributes.width = MAX (priv->width, allocation.width);
attributes.height = MAX (priv->height, allocation.height);
- attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK |
+ attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK |
+ GDK_SMOOTH_SCROLL_MASK |
gtk_widget_get_events (widget);
priv->bin_window = gdk_window_new (window,
&attributes, attributes_mask);
- gdk_window_set_user_data (priv->bin_window, widget);
+ gtk_widget_register_window (widget, priv->bin_window);
gtk_style_context_set_background (gtk_widget_get_style_context (widget), priv->bin_window);
tmp_list = priv->children;
GtkLayout *layout = GTK_LAYOUT (widget);
GtkLayoutPrivate *priv = layout->priv;
- gdk_window_set_user_data (priv->bin_window, NULL);
+ gtk_widget_unregister_window (widget, priv->bin_window);
gdk_window_destroy (priv->bin_window);
priv->bin_window = NULL;
gdk_window_move (priv->bin_window,
- gtk_adjustment_get_value (priv->hadjustment),
- gtk_adjustment_get_value (priv->vadjustment));
-
- gdk_window_process_updates (priv->bin_window, TRUE);
}
}