Try harder to set the event masks of descendent windows. (#169821, Tommi
2005-05-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.c (gtk_widget_add_events): Try harder to set the event masks of descendent windows. (#169821, Tommi Komulainen)
This commit is contained in:
committed by
Matthias Clasen
parent
763452a14f
commit
e9e878d1bc
@ -1,5 +1,8 @@
|
|||||||
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_add_events): Try harder to set
|
||||||
|
the event masks of descendent windows. (#169821, Tommi Komulainen)
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
||||||
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
||||||
handling of drop columns. (#143355, John Finlay)
|
handling of drop columns. (#143355, John Finlay)
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_add_events): Try harder to set
|
||||||
|
the event masks of descendent windows. (#169821, Tommi Komulainen)
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
||||||
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
||||||
handling of drop columns. (#143355, John Finlay)
|
handling of drop columns. (#143355, John Finlay)
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
2005-05-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_add_events): Try harder to set
|
||||||
|
the event masks of descendent windows. (#169821, Tommi Komulainen)
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
* gtk/gtktreeview.c (gtk_tree_view_get_drop_column)
|
||||||
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
(gtk_tree_view_set_column_drag_info): Fix some errors in the
|
||||||
handling of drop columns. (#143355, John Finlay)
|
handling of drop columns. (#143355, John Finlay)
|
||||||
|
|||||||
@ -5847,6 +5847,32 @@ gtk_widget_set_events (GtkWidget *widget,
|
|||||||
g_object_notify (G_OBJECT (widget), "events");
|
g_object_notify (G_OBJECT (widget), "events");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_widget_add_events_internal (GtkWidget *widget,
|
||||||
|
gint events,
|
||||||
|
GList *window_list)
|
||||||
|
{
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
for (l = window_list; l != NULL; l = l->next)
|
||||||
|
{
|
||||||
|
GdkWindow *window = l->data;
|
||||||
|
gpointer user_data;
|
||||||
|
|
||||||
|
gdk_window_get_user_data (window, &user_data);
|
||||||
|
if (user_data == widget)
|
||||||
|
{
|
||||||
|
GList *children;
|
||||||
|
|
||||||
|
gdk_window_set_events (window, gdk_window_get_events (window) | events);
|
||||||
|
|
||||||
|
children = gdk_window_get_children (window);
|
||||||
|
gtk_widget_add_events_internal (widget, events, children);
|
||||||
|
g_list_free (children);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_widget_add_events:
|
* gtk_widget_add_events:
|
||||||
* @widget: a #GtkWidget
|
* @widget: a #GtkWidget
|
||||||
@ -5885,28 +5911,16 @@ gtk_widget_add_events (GtkWidget *widget,
|
|||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (widget))
|
if (GTK_WIDGET_REALIZED (widget))
|
||||||
{
|
{
|
||||||
|
GList *window_list;
|
||||||
|
|
||||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||||
{
|
window_list = gdk_window_get_children (widget->window);
|
||||||
GList *children = gdk_window_get_children (widget->window);
|
|
||||||
GList *tmp_list = children;
|
|
||||||
|
|
||||||
while (tmp_list)
|
|
||||||
{
|
|
||||||
GdkWindow *window = tmp_list->data;
|
|
||||||
gpointer user_data;
|
|
||||||
|
|
||||||
gdk_window_get_user_data (window, &user_data);
|
|
||||||
if (user_data == widget)
|
|
||||||
gdk_window_set_events (window, gdk_window_get_events (window) | events);
|
|
||||||
tmp_list = tmp_list->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free (children);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
window_list = g_list_prepend (NULL, widget->window);
|
||||||
gdk_window_set_events (widget->window, gdk_window_get_events (widget->window) | events);
|
|
||||||
}
|
gtk_widget_add_events_internal (widget, events, window_list);
|
||||||
|
|
||||||
|
g_list_free (window_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (widget), "events");
|
g_object_notify (G_OBJECT (widget), "events");
|
||||||
|
|||||||
Reference in New Issue
Block a user