server-main: Add quit()
This allows to exit the mainloop e.g. when signalled from gnome-session or by a signal.
This commit is contained in:
@ -50,9 +50,16 @@ struct squeekboard {
|
||||
};
|
||||
|
||||
|
||||
GMainLoop *loop;
|
||||
static gboolean opt_system = FALSE;
|
||||
static gchar *opt_address = NULL;
|
||||
|
||||
static void
|
||||
quit (void)
|
||||
{
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
// D-Bus
|
||||
|
||||
static void
|
||||
@ -307,8 +314,7 @@ main (int argc, char **argv)
|
||||
|
||||
session_register();
|
||||
|
||||
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_main_loop_run (loop);
|
||||
|
||||
if (connection) {
|
||||
|
||||
Reference in New Issue
Block a user