- if (wmnotify_infos.mail_client_argv[0] != NULL) {
- /* Starting external mail client. */
- ExecuteCommand(wmnotify_infos.mail_client_argv);
-
- double_click_notif = true;
-
- /*
- * Sending a signal to awake the TimerThread() thread. This was
- * previously done with a mutex variable (animation_stop), but
- * this caused a bug when the following sequence was
- * encountered:
- * -The user double-click to start the external mail client
- * -A new E-mail is received shortly after that
- * -The user exit the external mail client
- * -The user manually check for new E-mail
- * -The audio notification sound is played, but no animation
- * image is displayed.
- * This was because setting the mutex variable 'animation_stop'
- * didn't awakened the TimerThread(), but single-clicking
- * awakened it. Since the 'animation_stop' variable was still
- * set to true, no animation occured.
- */
- status = pthread_kill(timer_thread, SIGUSR2);
- if (status != EXIT_SUCCESS) {
- fprintf(stderr, "%s: pthread_kill() error (%d)\n",
- PACKAGE, status);
- ErrorLocation(__FILE__, __LINE__);
- exit(EXIT_FAILURE);
- }
-
- DisplayExecuteCommandNotification();
- sleep(1);
- DisplayClosedMailbox();