summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-12-01 16:21:45 +0100
committerAlexander Larsson <alexl@redhat.com>2011-12-01 22:03:51 +0100
commit30ad4e676fe91351a2e5e71216ce74f1ef0c5c18 (patch)
treee7defa5b1bdf20714feb1aa064354837c6c22f55 /tests
parent9613e6ae196a3c61ba1798789ead21b2cd22d5f1 (diff)
downloadgtk+-30ad4e676fe91351a2e5e71216ce74f1ef0c5c18.tar.gz
testwindows: Add a button to cause a repaint
This makes it easy to find various kinds of repaint bugs
Diffstat (limited to 'tests')
-rw-r--r--tests/testwindows.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testwindows.c b/tests/testwindows.c
index ecae1cf907..0535b6327b 100644
--- a/tests/testwindows.c
+++ b/tests/testwindows.c
@@ -275,6 +275,13 @@ save_children (GString *s,
static void
+refresh_clicked (GtkWidget *button,
+ gpointer data)
+{
+ gtk_widget_queue_draw (darea);
+}
+
+static void
save_clicked (GtkWidget *button,
gpointer data)
{
@@ -1050,6 +1057,17 @@ main (int argc, char **argv)
G_CALLBACK (save_clicked),
NULL);
+ button = gtk_button_new_with_label ("Refresh");
+ gtk_box_pack_start (GTK_BOX (vbox),
+ button,
+ FALSE, FALSE,
+ 2);
+ gtk_widget_show (button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (refresh_clicked),
+ NULL);
+
+
gtk_widget_show (window);
if (argc == 2)