diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-12-16 20:09:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-12-16 20:09:30 +0000 |
commit | fcfe7370d8a9ac7b169282418e4f2bc58e6d9eb4 (patch) | |
tree | b1629251195a04377d72cbb49a90af3db3c18afb /tests/testthreads.c | |
parent | 0dcdac5828bfb039f0a35be2d21fd6b3b8750d4c (diff) | |
download | gtk+-fcfe7370d8a9ac7b169282418e4f2bc58e6d9eb4.tar.gz |
Move main thread lock back to GDK - we need it there for locking when
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
thread lock back to GDK - we need it there for locking
when translating events. Rename things appropriately.
Wed Dec 16 11:44:21 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_expose): Fix a x/y typo.
CVS:
Diffstat (limited to 'tests/testthreads.c')
-rw-r--r-- | tests/testthreads.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/testthreads.c b/tests/testthreads.c index 999c5e0d4c..e330a74a5e 100644 --- a/tests/testthreads.c +++ b/tests/testthreads.c @@ -53,7 +53,7 @@ counter (void *data) GtkWidget *label; GtkWidget *button; - gtk_threads_enter(); + gdk_threads_enter(); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), name); @@ -83,7 +83,7 @@ counter (void *data) { sprintf(buffer, "%d", counter); gtk_label_set_text (GTK_LABEL (label), buffer); - gtk_threads_leave(); + gdk_threads_leave(); counter++; /* Give someone else a chance to get the lock next time. * Only necessary because we don't do anything else while @@ -91,7 +91,7 @@ counter (void *data) */ sleep(0); - gtk_threads_enter(); + gdk_threads_enter(); } gtk_widget_destroy (window); @@ -102,7 +102,7 @@ counter (void *data) gtk_main_quit(); pthread_mutex_unlock (&nthreads_mutex); - gtk_threads_leave(); + gdk_threads_leave(); return NULL; } @@ -115,7 +115,7 @@ main (int argc, char **argv) #ifdef USE_PTHREADS int i; - if (!gtk_threads_init()) + if (!gdk_threads_init()) { fprintf(stderr, "Could not initialize threads\n"); exit(1); @@ -141,9 +141,9 @@ main (int argc, char **argv) pthread_mutex_unlock (&nthreads_mutex); - gtk_threads_enter(); + gdk_threads_enter(); gtk_main(); - gtk_threads_leave(); + gdk_threads_leave(); fprintf(stderr, "Done\n"); #else /* !USE_PTHREADS */ fprintf (stderr, "GTK+ not compiled with threads support\n"); |