From 00d4bf0a9c92515dd718038a470e1c6ab2fe73ed Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 14 Sep 2014 00:27:09 +0000 Subject: broken, but on the right way --- spectrogram.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'spectrogram.c') diff --git a/spectrogram.c b/spectrogram.c index f6064db..dcc3f02 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -17,7 +17,9 @@ #include #include + #include +#include #include "Sgraph.h" #include @@ -60,7 +62,7 @@ static XrmOptionDescRec options[] = { }; static void -quit() +quit(Widget w, XEvent *event, String *params, Cardinal *num_params) { exit(0); } @@ -69,14 +71,23 @@ static XtActionsRec actionsList[] = { { "quit", quit }, }; +static Boolean +worker(XtPointer client_data) +{ + return True; +} + int main(int argc, char **argv) { + XtAppContext app; Widget toplevel, sgraph; - toplevel = XtInitialize(__progname, "Spectrograph", - options, XtNumber(options), &argc, argv); - XtAddActions(actionsList, 1); + toplevel = XtOpenApplication(&app, "Spectrograph", + options, XtNumber(options), &argc, argv, NULL, + sessionShellWidgetClass, NULL, 0); + XtAppAddActions(app, actionsList, XtNumber(actionsList)); + XtAppAddWorkProc(app, worker, NULL); if (argc != 1) usage(); -- cgit v1.2.3