gtk_window_show/hide
- From: "Nob Kato" <nobkato mbox kyoto-inet or jp>
- To: <gtk-app-devel-list gnome org>
- Subject: gtk_window_show/hide
- Date: Fri, 1 Mar 2002 23:19:55 +0900
Hello.
I want to show/hide gtk-window from other thread in same process.
so I tried to write a program as follows.
1. from other process (e.g.terminal-program "kill -n 40(or 41) pid")
my window show/hide successfully.
2. form other thread in same process: call raise (40) or raise (41)
my window does not hide.
but "SHOW" or "HIDE" are displayed.(printf)
please help me.
thanks
Nob
#define SIG_SHOW 40
#define SIG_SHOW 41
main ()
{
...
main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
...
sigaction (SIG_SHOW, &act, 0);
sigaction (SIG_HIDE, &act, 0);
...
gtk_main();
}
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]