summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/menus.c4
-rw-r--r--src/parse.c5
-rw-r--r--src/twm.c2
-rw-r--r--src/twm.h20
5 files changed, 25 insertions, 12 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index bb45b53..96fa621 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,12 +28,8 @@ rcdir = ${datadir}/X11/twm
dist_rc_DATA = system.twmrc
AM_CPPFLAGS = \
- -DAPP_NAME=\"twm\" \
- -DAPP_CLASS=\"twm\" \
-DAPP_VERSION=\"$(VERSION)\" \
- -DXVENDORNAME=\"The\ X.Org\ Foundation\" \
- -DXORG_RELEASE=\"Release\ $(VERSION)\" \
- -DSYSTEM_INIT_FILE=\"${rcdir}/system.twmrc\"
+ -DDATADIR=\"${datadir}\"
AM_CFLAGS = $(TWM_CFLAGS) $(XRANDR_CFLAGS) $(CWARNFLAGS)
twm_LDADD = $(TWM_LIBS) $(XRANDR_LIBS)
diff --git a/src/menus.c b/src/menus.c
index 9b4ecd3..41f5bad 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -2529,8 +2529,8 @@ Identify(TwmWindow *t)
Window wdummy = None;
n = 0;
- snprintf(Info[n++], INFO_SIZE, "Twm version: %s, %s",
- XVENDORNAME, XORG_RELEASE);
+ snprintf(Info[n++], INFO_SIZE, "Twm version: %s, Release %s",
+ XVENDORNAME, APP_VERSION);
Info[n++][0] = '\0';
if (t) {
diff --git a/src/parse.c b/src/parse.c
index c659e53..c841489 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -71,9 +71,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xatom.h>
#include <X11/extensions/sync.h>
-#ifndef SYSTEM_INIT_FILE
-#define SYSTEM_INIT_FILE "/usr/lib/X11/twm/system.twmrc"
-#endif
#define BUF_LEN 300
static FILE *twmrc;
@@ -200,7 +197,7 @@ ParseTwmrc(char *filename)
break;
case 3: /* system.twmrc */
- cp = SYSTEM_INIT_FILE;
+ cp = DATADIR "/X11/twm/system.twmrc";
break;
}
diff --git a/src/twm.c b/src/twm.c
index a5e93bc..4be177c 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -316,7 +316,7 @@ main(int argc, char *argv[])
si = XtAppAddSignal(appContext, Done, NULL);
- if (!(dpy = XtOpenDisplay(appContext, display_name, "twm", "twm",
+ if (!(dpy = XtOpenDisplay(appContext, display_name, APP_NAME, APP_CLASS,
NULL, 0, &zero, NULL))) {
twmError("unable to open display \"%s\"", XDisplayName(display_name));
}
diff --git a/src/twm.h b/src/twm.h
index 46ddd2a..db55a32 100644
--- a/src/twm.h
+++ b/src/twm.h
@@ -74,6 +74,26 @@ from The Open Group.
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
+#ifndef APP_NAME
+#define APP_NAME "twm"
+#endif
+
+#ifndef APP_CLASS
+#define APP_CLASS "twm"
+#endif
+
+#ifndef APP_VERSION
+#define APP_VERSION "unknown"
+#endif
+
+#ifndef DATADIR
+#define DATADIR "/usr/local/share"
+#endif
+
+#ifndef XVENDORNAME
+#define XVENDORNAME "The X.Org Foundation"
+#endif
+
#ifndef WithdrawnState
#define WithdrawnState 0
#endif