aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-26 16:01:46 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-26 16:01:46 +0000
commit6b11385376dc799eb958851770d39dbe3648bdf6 (patch)
tree0a36a97ab9aed97f088b6bb433fd72a0af44bc96
parent04d7f87e664d5d09b03a23fbdbc976577a3c198d (diff)
inherit everything
-rw-r--r--Display.c8
-rw-r--r--spectrogram.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/Display.c b/Display.c
index 6cf011f..6a82b55 100644
--- a/Display.c
+++ b/Display.c
@@ -40,16 +40,16 @@ DisplayClassRec displayClassRec = {
.compress_enterleave = True,
.visible_interest = False,
.destroy = NULL,
- .resize = NULL,
- .expose = NULL,
+ .resize = XtInheritResize,
+ .expose = XtInheritExpose,
.set_values = NULL,
.set_values_hook = NULL,
.set_values_almost = XtInheritSetValuesAlmost,
.get_values_hook = NULL,
- .accept_focus = NULL,
+ .accept_focus = XtInheritAcceptFocus,
.version = XtVersion,
.callback_private = NULL,
- .tm_table = NULL,
+ .tm_table = XtInheritTranslations,
.query_geometry = XtInheritQueryGeometry,
.display_accelerator = XtInheritDisplayAccelerator,
.extension = NULL,
diff --git a/spectrogram.c b/spectrogram.c
index 76f216c..9a1b828 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -19,6 +19,7 @@
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
+#include "Display.h"
#include "Sgraph.h"
#include <err.h>
@@ -104,7 +105,7 @@ int
main(int argc, char **argv)
{
XtAppContext app;
- Widget toplevel, sgraph;
+ Widget toplevel, display, sgraph;
int n, samples;
Arg args[10];
@@ -120,10 +121,13 @@ main(int argc, char **argv)
init_fft(samples);
warnx("samples: %d", samples);
+ display = XtCreateManagedWidget("Display", displayWidgetClass,
+ toplevel, NULL, 0);
+
n = 0;
XtSetArg(args[n], XtNsamples, samples); n++;
sgraph = XtCreateManagedWidget("SGraph", sgraphWidgetClass,
- toplevel, args, n);
+ display, args, n);
XtOverrideTranslations(sgraph,
XtParseTranslationTable("<Key>q: quit()"));