Re: gtk_window_show/hide



"Nob Kato" <nobkato mbox kyoto-inet or jp> writes: 
void *signal_handler ( int sig)
{
  switch (sig) {
  case SIG_SHOW:
    gtk_window_show (main_window);
    printf ("SHOW\n");
    break;
  case SIG_HIDE:
    gtk_window_hide (main_window);
    printf ("HIDE\n");
    break;
  }
  return NULL;
}

You can't call these functions from a signal handler. It will break.

You want to use pipes or something instead of signals, probably. Or in 
your signal handler, write to a pipe, which wakes up another thread
via an input handler (gdk_input_add() or g_io_add_watch()).

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]