From Patrice Fortier <Patrice.Fortier@aquarel.fr>

Mon Feb 16 23:47:09 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkviewport.c: (gtk-fortier-980130-0)
	  From Patrice Fortier <Patrice.Fortier@aquarel.fr>

	  Eliminate some extra expose events for viewports.
	  (To be conservative, I set the user's event mask for
	   both widget->window, and viewport->bin_window  -owt)
This commit is contained in:
Owen Taylor 1998-02-17 04:48:50 +00:00 committed by Owen Taylor
parent d91da80871
commit 7b399a225c
8 changed files with 106 additions and 2 deletions

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -1,3 +1,17 @@
Mon Feb 16 23:47:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkviewport.c: (gtk-fortier-980130-0)
From Patrice Fortier <Patrice.Fortier@aquarel.fr>
Eliminate some extra expose events for viewports.
(To be conservative, I set the user's event mask for
both widget->window, and viewport->bin_window -owt)
Mon Feb 16 23:12:14 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c: Make timeout and idle insertion code
use g_list_insert_sorted().
Mon Feb 16 17:35:17 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtktreeitem.c: Use gtk_signal_default_marshaller,

View File

@ -281,6 +281,7 @@ gtk_viewport_realize (GtkWidget *widget)
GdkWindowAttr attributes;
GtkRequisition *child_requisition;
gint attributes_mask;
gint event_mask;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_VIEWPORT (widget));
@ -297,7 +298,9 @@ gtk_viewport_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = event_mask;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
@ -309,12 +312,14 @@ gtk_viewport_realize (GtkWidget *widget)
attributes.y += widget->style->klass->ythickness;
attributes.width -= widget->style->klass->xthickness * 2;
attributes.height -= widget->style->klass->ythickness * 2;
attributes.event_mask = 0;
viewport->view_window = gdk_window_new (widget->window, &attributes, attributes_mask);
gdk_window_set_user_data (viewport->view_window, viewport);
attributes.x = 0;
attributes.y = 0;
attributes.event_mask = event_mask;
viewport->bin_window = gdk_window_new (viewport->view_window, &attributes, attributes_mask);
gdk_window_set_user_data (viewport->bin_window, viewport);
@ -431,7 +436,8 @@ gtk_viewport_expose (GtkWidget *widget,
gtk_viewport_paint (widget, &event->area);
child_event = *event;
if (bin->child &&
if ((event->window == viewport->bin_window) &&
(bin->child != NULL) &&
GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);