forked from AuroraMiddleware/gtk
layout: Use gdk_window_new_child()
This commit is contained in:
parent
3fc32511b5
commit
5d3f6367cb
@ -863,41 +863,28 @@ gtk_layout_realize (GtkWidget *widget)
|
|||||||
GtkLayoutPrivate *priv = layout->priv;
|
GtkLayoutPrivate *priv = layout->priv;
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
GdkWindowAttr attributes;
|
|
||||||
GList *tmp_list;
|
GList *tmp_list;
|
||||||
gint attributes_mask;
|
|
||||||
|
|
||||||
gtk_widget_set_realized (widget, TRUE);
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
|
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
|
||||||
attributes.window_type = GDK_WINDOW_CHILD;
|
window = gdk_window_new_child (gtk_widget_get_parent_window (widget),
|
||||||
attributes.x = allocation.x;
|
GDK_VISIBILITY_NOTIFY_MASK,
|
||||||
attributes.y = allocation.y;
|
&allocation);
|
||||||
attributes.width = allocation.width;
|
|
||||||
attributes.height = allocation.height;
|
|
||||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
|
||||||
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
|
|
||||||
|
|
||||||
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
|
||||||
|
|
||||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
|
||||||
&attributes, attributes_mask);
|
|
||||||
gtk_widget_set_window (widget, window);
|
gtk_widget_set_window (widget, window);
|
||||||
gtk_widget_register_window (widget, window);
|
gtk_widget_register_window (widget, window);
|
||||||
|
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
priv->bin_window = gdk_window_new_child (window,
|
||||||
|
gtk_widget_get_events (widget)
|
||||||
attributes.x = - gtk_adjustment_get_value (priv->hadjustment),
|
| GDK_EXPOSURE_MASK
|
||||||
attributes.y = - gtk_adjustment_get_value (priv->vadjustment);
|
| GDK_SCROLL_MASK
|
||||||
attributes.width = MAX (priv->width, allocation.width);
|
| GDK_SMOOTH_SCROLL_MASK,
|
||||||
attributes.height = MAX (priv->height, allocation.height);
|
&(GdkRectangle) {
|
||||||
attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK |
|
- gtk_adjustment_get_value (priv->hadjustment),
|
||||||
GDK_SMOOTH_SCROLL_MASK |
|
- gtk_adjustment_get_value (priv->vadjustment),
|
||||||
gtk_widget_get_events (widget);
|
MAX (priv->width, allocation.width),
|
||||||
|
MAX (priv->height, allocation.height)});
|
||||||
priv->bin_window = gdk_window_new (window,
|
|
||||||
&attributes, attributes_mask);
|
|
||||||
gtk_widget_register_window (widget, priv->bin_window);
|
gtk_widget_register_window (widget, priv->bin_window);
|
||||||
|
|
||||||
tmp_list = priv->children;
|
tmp_list = priv->children;
|
||||||
|
Loading…
Reference in New Issue
Block a user