forked from AuroraMiddleware/gtk
Only draw for events on the bin window.
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com> * tests/testgtk.c (layout_expose_handler): Only draw for events on the bin window.
This commit is contained in:
parent
9361b2c2e4
commit
389bc8ebad
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Dec 11 19:18:21 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testgtk.c (layout_expose_handler): Only draw
|
||||
for events on the bin window.
|
||||
|
||||
Tue Dec 11 18:55:16 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
|
||||
|
@ -10677,26 +10677,25 @@ create_mainloop (void)
|
||||
gtk_widget_destroy (window);
|
||||
}
|
||||
|
||||
gint
|
||||
gboolean
|
||||
layout_expose_handler (GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
|
||||
gint i,j;
|
||||
gint imin, imax, jmin, jmax;
|
||||
|
||||
|
||||
layout = GTK_LAYOUT (widget);
|
||||
|
||||
if (event->window != layout->bin_window)
|
||||
return FALSE;
|
||||
|
||||
imin = (event->area.x) / 10;
|
||||
imax = (event->area.x + event->area.width + 9) / 10;
|
||||
|
||||
jmin = (event->area.y) / 10;
|
||||
jmax = (event->area.y + event->area.height + 9) / 10;
|
||||
|
||||
gdk_window_clear_area (widget->window,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
|
||||
for (i=imin; i<imax; i++)
|
||||
for (j=jmin; j<jmax; j++)
|
||||
if ((i+j) % 2)
|
||||
|
Loading…
Reference in New Issue
Block a user