[gtk+/layered-windows: 6/10] testwindows: Add a button to cause a repaint
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/layered-windows: 6/10] testwindows: Add a button to cause a repaint
- Date: Thu, 1 Dec 2011 16:49:16 +0000 (UTC)
commit d2b0f5688e52a212502482a2ffcdc1f3b80e7f93
Author: Alexander Larsson <alexl redhat com>
Date: Thu Dec 1 16:21:45 2011 +0100
testwindows: Add a button to cause a repaint
This makes it easy to find various kinds of repaint bugs
tests/testwindows.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/tests/testwindows.c b/tests/testwindows.c
index 8b98d6c..5c572bb 100644
--- a/tests/testwindows.c
+++ b/tests/testwindows.c
@@ -276,6 +276,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)
{
@@ -1041,6 +1048,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]