forked from AuroraMiddleware/gtk
fully initialize GdkWindowAttr to avoid valgrind warnings. (#507751, patch
2008-01-10 Kristian Rietveld <kris@imendio.com> * gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow), (_gtk_tree_view_column_start_drag): fully initialize GdkWindowAttr to avoid valgrind warnings. (#507751, patch from Christian Persch). svn path=/trunk/; revision=19333
This commit is contained in:
parent
496d330181
commit
c7d28a02f5
@ -1,3 +1,9 @@
|
||||
2008-01-10 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow),
|
||||
(_gtk_tree_view_column_start_drag): fully initialize GdkWindowAttr to
|
||||
avoid valgrind warnings. (#507751, patch from Christian Persch).
|
||||
|
||||
2008-01-10 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_get_path): Fix
|
||||
|
@ -3333,6 +3333,10 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
attributes.x = tree_view->priv->drag_column_x;
|
||||
attributes.y = 0;
|
||||
width = attributes.width = tree_view->priv->drag_column->button->allocation.width;
|
||||
height = attributes.height = tree_view->priv->drag_column->button->allocation.height;
|
||||
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
|
||||
attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
|
||||
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
|
||||
@ -3340,11 +3344,6 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
tree_view->priv->drag_highlight_window = gdk_window_new (tree_view->priv->header_window, &attributes, attributes_mask);
|
||||
gdk_window_set_user_data (tree_view->priv->drag_highlight_window, GTK_WIDGET (tree_view));
|
||||
|
||||
width = tree_view->priv->drag_column->button->allocation.width;
|
||||
height = tree_view->priv->drag_column->button->allocation.height;
|
||||
gdk_window_move_resize (tree_view->priv->drag_highlight_window,
|
||||
tree_view->priv->drag_column_x, 0, width, height);
|
||||
|
||||
mask = gdk_pixmap_new (tree_view->priv->drag_highlight_window, width, height, 1);
|
||||
gc = gdk_gc_new (mask);
|
||||
col.pixel = 1;
|
||||
@ -3400,6 +3399,8 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
|
||||
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
attributes.x = x;
|
||||
attributes.y = y;
|
||||
attributes.width = width;
|
||||
attributes.height = height;
|
||||
tree_view->priv->drag_highlight_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
@ -3474,6 +3475,8 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
|
||||
attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
|
||||
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
attributes.x = x;
|
||||
attributes.y = y;
|
||||
attributes.width = width;
|
||||
attributes.height = height;
|
||||
tree_view->priv->drag_highlight_window = gdk_window_new (NULL, &attributes, attributes_mask);
|
||||
@ -9340,6 +9343,10 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
attributes.x = column->button->allocation.x;
|
||||
attributes.y = 0;
|
||||
attributes.width = column->button->allocation.width;
|
||||
attributes.height = column->button->allocation.height;
|
||||
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
|
||||
attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view));
|
||||
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
|
||||
@ -9382,12 +9389,6 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
||||
gtk_propagate_event (column->button, send_event);
|
||||
gdk_event_free (send_event);
|
||||
|
||||
gdk_window_move_resize (tree_view->priv->drag_window,
|
||||
column->button->allocation.x,
|
||||
0,
|
||||
column->button->allocation.width,
|
||||
column->button->allocation.height);
|
||||
|
||||
/* Kids, don't try this at home */
|
||||
g_object_ref (column->button);
|
||||
gtk_container_remove (GTK_CONTAINER (tree_view), column->button);
|
||||
|
Loading…
Reference in New Issue
Block a user