[gtk+/rendering-cleanup-next: 133/199] testgtk: Make big windows test not use expose events
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 133/199] testgtk: Make big windows test not use expose events
- Date: Thu, 23 Sep 2010 21:30:16 +0000 (UTC)
commit 33f168524215f4f03216d42f62cb5e8cc70f7850
Author: Benjamin Otte <otte redhat com>
Date: Thu Sep 9 03:01:09 2010 +0200
testgtk: Make big windows test not use expose events
Instead, use gdk_window_set_background().
tests/testgtk.c | 28 +---------------------------
1 files changed, 1 insertions(+), 27 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index a60cb67..68a4f38 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -454,29 +454,6 @@ create_composited_window (GtkWidget *widget)
* Big windows and guffaw scrolling
*/
-static gboolean
-pattern_expose (GtkWidget *widget,
- GdkEventExpose *event,
- gpointer data)
-{
- GdkColor *color;
- GdkWindow *window = event->window;
-
- color = g_object_get_data (G_OBJECT (window), "pattern-color");
- if (color)
- {
- cairo_t *cr = gdk_cairo_create (window);
-
- gdk_cairo_set_source_color (cr, color);
- gdk_cairo_rectangle (cr, &event->area);
- cairo_fill (cr);
-
- cairo_destroy (cr);
- }
-
- return FALSE;
-}
-
static void
pattern_set_bg (GtkWidget *widget,
GdkWindow *child,
@@ -488,8 +465,8 @@ pattern_set_bg (GtkWidget *widget,
{ 0, 0xaaaa, 0xaaaa, 0xffff }
};
- g_object_set_data (G_OBJECT (child), "pattern-color", (gpointer) &colors[level]);
gdk_window_set_user_data (child, widget);
+ gdk_window_set_background (child, &colors[level]);
}
static void
@@ -644,9 +621,6 @@ create_big_windows (GtkWidget *widget)
g_signal_connect (darea, "realize",
G_CALLBACK (pattern_realize),
NULL);
- g_signal_connect (darea, "expose_event",
- G_CALLBACK (pattern_expose),
- NULL);
eventbox = gtk_event_box_new ();
gtk_table_attach (GTK_TABLE (table), eventbox,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]