Fix position of hidden panel, placed at screen edge with upper coordinate (usually...
[window-docker.git] / sig_handler.c
blob54531c41fa01fc9cec4512af0bd97aa1c3ed6d59
1 /*
2 * Window Docker
4 * Copyright (C) 2011 Nikita Zlobin <cook60020tmp@mail.ru>
6 **************************************************************************
7 * This file is part of Window Docker utility
8 **************************************************************************
10 * Window Docker is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * Window Docker is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Window Docker. If not, see <http://www.gnu.org/licenses/>
22 * or write to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "main.h"
28 #include <signal.h>
29 #include <string.h>
31 void on_terminate (int sig)
33 g_print ("Quit...\n");
34 gtk_main_quit ();
37 void sig_handler_init (void)
39 struct sigaction act;
40 memset (&act, '\0', sizeof (act));
41 act.sa_handler = on_terminate;
42 sigaction (SIGTERM, & act, 0);
43 sigaction (SIGINT, & act, 0);
44 sigaction (SIGQUIT, & act, 0);