Commit f6bb7584 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Federico Mena Quintero
Browse files

Don't do operations on windows if the tree view is not mapped.

2003-10-13  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
	operations on windows if the tree view is not mapped.
	(gtk_tree_view_button_press): Compare equal types of pointers, not
	GtkWidget* vs. GtkTreeView*.
parent 36eccd81
2003-10-13 Federico Mena Quintero <federico@ximian.com>
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
operations on windows if the tree view is not mapped.
(gtk_tree_view_button_press): Compare equal types of pointers, not
GtkWidget* vs. GtkTreeView*.
Mon Oct 13 21:01:43 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkentrycompletion.c (gtk_entry_completion_popup): remove
......
2003-10-13 Federico Mena Quintero <federico@ximian.com>
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
operations on windows if the tree view is not mapped.
(gtk_tree_view_button_press): Compare equal types of pointers, not
GtkWidget* vs. GtkTreeView*.
Mon Oct 13 21:01:43 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkentrycompletion.c (gtk_entry_completion_popup): remove
......
2003-10-13 Federico Mena Quintero <federico@ximian.com>
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
operations on windows if the tree view is not mapped.
(gtk_tree_view_button_press): Compare equal types of pointers, not
GtkWidget* vs. GtkTreeView*.
Mon Oct 13 21:01:43 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkentrycompletion.c (gtk_entry_completion_popup): remove
......
2003-10-13 Federico Mena Quintero <federico@ximian.com>
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
operations on windows if the tree view is not mapped.
(gtk_tree_view_button_press): Compare equal types of pointers, not
GtkWidget* vs. GtkTreeView*.
Mon Oct 13 21:01:43 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkentrycompletion.c (gtk_entry_completion_popup): remove
......
2003-10-13 Federico Mena Quintero <federico@ximian.com>
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Don't do
operations on windows if the tree view is not mapped.
(gtk_tree_view_button_press): Compare equal types of pointers, not
GtkWidget* vs. GtkTreeView*.
Mon Oct 13 21:01:43 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkentrycompletion.c (gtk_entry_completion_popup): remove
......
......@@ -2188,7 +2188,7 @@ gtk_tree_view_button_press (GtkWidget *widget,
/* Save press to possibly begin a drag
*/
grab_widget = gtk_grab_get_current ();
if ((grab_widget == NULL || grab_widget == tree_view) &&
if ((grab_widget == NULL || grab_widget == GTK_WIDGET (tree_view)) &&
!column_handled_click &&
tree_view->priv->pressed_button < 0)
{
......@@ -9895,29 +9895,33 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
g_signal_emit (tree_view, tree_view_signals[ROW_COLLAPSED], 0, &iter, path);
/* now that we've collapsed all rows, we want to try to set the prelight
* again. To do this, we fake a motion event and send it to ourselves. */
if (GTK_WIDGET_MAPPED (tree_view))
{
/* now that we've collapsed all rows, we want to try to set the prelight
* again. To do this, we fake a motion event and send it to ourselves. */
display = gdk_drawable_get_display (tree_view->priv->bin_window);
child = tree_view->priv->bin_window;
parent = gdk_window_get_parent (child);
display = gdk_drawable_get_display (tree_view->priv->bin_window);
child = tree_view->priv->bin_window;
parent = gdk_window_get_parent (child);
if (gdk_window_get_pointer (parent, &x, &y, NULL) == child)
{
GdkEventMotion event;
gint child_x, child_y;
if (gdk_window_get_pointer (parent, &x, &y, NULL) == child)
{
GdkEventMotion event;
gint child_x, child_y;
gdk_window_get_position (child, &child_x, &child_y);
gdk_window_get_position (child, &child_x, &child_y);
event.window = tree_view->priv->bin_window;
event.x = x - child_x;
event.y = y - child_y;
event.window = tree_view->priv->bin_window;
event.x = x - child_x;
event.y = y - child_y;
/* despite the fact this isn't a real event, I'm almost positive it will
* never trigger a drag event. maybe_drag is the only function that uses
* more than just event.x and event.y. */
gtk_tree_view_motion_bin_window (GTK_WIDGET (tree_view), &event);
/* despite the fact this isn't a real event, I'm almost positive it will
* never trigger a drag event. maybe_drag is the only function that uses
* more than just event.x and event.y. */
gtk_tree_view_motion_bin_window (GTK_WIDGET (tree_view), &event);
}
}
return TRUE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment