Index: plugins/clock/clock.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/plugins/clock/clock.c,v retrieving revision 1.31 diff -u -r1.31 clock.c --- plugins/clock/clock.c 6 Apr 2004 06:46:07 -0000 1.31 +++ plugins/clock/clock.c 23 Jul 2004 19:23:28 -0000 @@ -156,7 +156,9 @@ static gboolean retry_popup_xfcalendar (GtkWidget * widget) { + gdk_threads_enter (); popup_xfcalendar (widget, gtk_get_current_event_time ()); + gdk_threads_leave (); return FALSE; } @@ -215,6 +217,14 @@ return TRUE; } +static gboolean +clock_date_tooltip_timeout (GtkWidget * widget) +{ + gdk_threads_enter (); + clock_date_tooltip (widget); + gdk_threads_leave (); +} + static t_clock * clock_new (void) { @@ -232,7 +242,7 @@ clock_date_tooltip (clock->eventbox); clock->timeout_id = - g_timeout_add (60000, (GSourceFunc) clock_date_tooltip, + g_timeout_add (60000, (GSourceFunc) clock_date_tooltip_timeout, clock->eventbox); /* callback for calendar popup */ Index: plugins/mailcheck/mailcheck.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/plugins/mailcheck/mailcheck.c,v retrieving revision 1.43 diff -u -r1.43 mailcheck.c --- plugins/mailcheck/mailcheck.c 17 Jun 2004 13:49:13 -0000 1.43 +++ plugins/mailcheck/mailcheck.c 23 Jul 2004 19:23:28 -0000 @@ -167,6 +167,8 @@ static gboolean set_mail_icon (t_mailcheck * mc) { + gdk_threads_leave (); + if (mc->status == NO_MAIL) { xfce_iconbutton_set_pixbuf (XFCE_ICONBUTTON (mc->button), @@ -183,6 +185,8 @@ mc->newmail_pb); } + gdk_threads_leave (); + return FALSE; } Index: panel/item.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/panel/item.c,v retrieving revision 1.37 diff -u -r1.37 item.c --- panel/item.c 14 Jul 2004 18:27:41 -0000 1.37 +++ panel/item.c 23 Jul 2004 19:23:28 -0000 @@ -200,6 +200,8 @@ popup_timeout_id = 0; + gdk_threads_enter (); + /* FIXME: items should know about their parent */ /* Explanantion of code below: @@ -238,6 +240,8 @@ } } + gdk_threads_leave (); + return FALSE; } Index: panel/main.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/panel/main.c,v retrieving revision 1.52 diff -u -r1.52 main.c --- panel/main.c 15 Jul 2004 12:23:04 -0000 1.52 +++ panel/main.c 23 Jul 2004 19:23:28 -0000 @@ -147,7 +147,9 @@ sigstate = RESTART; /* calls gtk_main_quit() */ + gdk_threads_enter (); quit (TRUE); + gdk_threads_leave (); /* progname is saved on startup * TODO: do we need to pass on arguments? */ @@ -166,8 +168,10 @@ if (sigstate != NOSIGNAL) { /* close open dialogs */ + gdk_threads_enter (); destroy_controls_dialog (); destroy_menu_dialog (); + gdk_threads_leave (); if (sigstate == RESTART && !restarting) { @@ -177,12 +181,17 @@ } else if (sigstate == QUIT) { + gdk_threads_enter (); quit (TRUE); + gdk_threads_leave (); + } else if (sigstate == QUIT_CONFIRM) { sigstate = NOSIGNAL; + gdk_threads_enter (); quit (FALSE); + gdk_threads_leave (); } } @@ -334,8 +343,13 @@ return 0; } + if (!g_thread_supported ()) + g_thread_init (NULL); + gdk_threads_init (); gtk_init (&argc, &argv); + gdk_threads_enter (); + progname = argv[0]; if (xfce_panel_is_running ()) @@ -405,5 +419,7 @@ gtk_main (); + gdk_threads_leave (); + return 0; } Index: panel/panel.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/panel/panel.c,v retrieving revision 1.101 diff -u -r1.101 panel.c --- panel/panel.c 22 Jul 2004 15:00:39 -0000 1.101 +++ panel/panel.c 23 Jul 2004 19:23:29 -0000 @@ -795,7 +795,9 @@ if (!p->hidden) { + gdk_threads_enter (); panel_set_hidden (p, TRUE); + gdk_threads_leave (); } else DBG ("already hidden"); @@ -807,7 +809,11 @@ panel_unhide_timeout (Panel * p) { if (p->hidden) + { + gdk_threads_enter (); panel_set_hidden (p, FALSE); + gdk_threads_leave (); + } return FALSE; } Index: panel/xfce_support.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/panel/xfce_support.c,v retrieving revision 1.57 diff -u -r1.57 xfce_support.c --- panel/xfce_support.c 11 Jul 2004 12:41:48 -0000 1.57 +++ panel/xfce_support.c 23 Jul 2004 19:23:29 -0000 @@ -700,8 +700,10 @@ static gboolean delayed_exec (ActionCommand * command) { + gdk_threads_enter (); real_exec_cmd (command->cmd, command->in_terminal, command->use_sn, command->silent); + gdk_threads_leave (); g_free (command->cmd); g_free (command); Index: panel/Makefile.am =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/panel/Makefile.am,v retrieving revision 1.33 diff -u -r1.33 Makefile.am --- panel/Makefile.am 9 Apr 2004 14:36:32 -0000 1.33 +++ panel/Makefile.am 23 Jul 2004 19:23:29 -0000 @@ -57,6 +57,7 @@ @LIBXFCEGUI4_CFLAGS@ \ @LIBXFCE4MCS_CLIENT_CFLAGS@ \ @LIBXML_CFLAGS@ \ + @GTHREAD_CFLAGS@ \ -DDATADIR=\"$(datadir)/xfce4\" \ -DLIBDIR=\"$(libdir)/xfce4\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ @@ -68,6 +69,7 @@ xfce4_panel_LDADD = \ @LIBSTARTUP_NOTIFICATION_LIBS@ \ @LIBX11_LIBS@ \ + @GTHREAD_LIBS@ \ @LIBXFCEGUI4_LIBS@ \ @LIBXFCE4MCS_CLIENT_LIBS@ \ @LIBXML_LIBS@ \ Index: configure.ac =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce4-panel/configure.ac,v retrieving revision 1.104 diff -u -r1.104 configure.ac --- configure.ac 9 Jul 2004 20:17:35 -0000 1.104 +++ configure.ac 23 Jul 2004 19:23:29 -0000 @@ -40,6 +40,7 @@ BM_LIBX11_REQUIRE dnl Check for required packages +BM_DEPEND([GTHREAD], [gthread-2.0], [2.0.6]) BM_DEPEND([LIBXFCE4MCS_CLIENT], [libxfce4mcs-client-1.0], [4.0.0]) BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.1.19]) BM_DEPEND([LIBXML], [libxml-2.0], [2.4.0])