summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2002-04-04 14:02:12 +0000
committerWill Andrews <will@FreeBSD.org>2002-04-04 14:02:12 +0000
commit267499ca8a2474cd051e913c7e26ebf1e3b9dd9e (patch)
tree03c4153c1b6f6d344e03130ad9bafa025ab1a792
parentMake the perl regex to get rid of malloc.h much much more broad. Should (diff)
Add Xinerama support for WDM (yay!!). Bump PORTREVISION.
George helped me better understand the Xinerama API. Please note that there is no support for specifying a particular physical display for which the login frame should appear -- it will always choose physical screen number zero. Helped with this patch: George Staikos <staikos@kde.org>
Notes
Notes: svn path=/head/; revision=57312
-rw-r--r--x11/wdm/Makefile10
-rw-r--r--x11/wdm/files/patch-Login.c54
2 files changed, 63 insertions, 1 deletions
diff --git a/x11/wdm/Makefile b/x11/wdm/Makefile
index dec87ce14630..c5d607b49bb1 100644
--- a/x11/wdm/Makefile
+++ b/x11/wdm/Makefile
@@ -7,6 +7,7 @@
PORTNAME= wdm
PORTVERSION= 1.20
+PORTREVISION= 1
CATEGORIES= x11 windowmaker
MASTER_SITES= http://www.tcscs.com/wdm/wdm/ \
http://www.de.freebsd.org/de/gif/bsd/
@@ -37,6 +38,13 @@ CONFIGURE_ARGS= --with-logdir=/var/log \
--with-defsystempath=/bin:/usr/bin:/sbin:/usr/sbin:${X11BASE}/bin \
--with-wmlist=wmaker:afterstep:blackbox:ctwm:enlightenment:fvwm:fvwm2:fvwm95:olvwm:qvwm:tvtwm
+.include <bsd.port.pre.mk>
+
+.if ${XFREE86_VERSION} == 4
+CFLAGS+= -DHAVE_XINERAMA
+CONFIGURE_ENV+= LIBS="-Wl,-export-dynamic ${X11BASE}/lib/libXinerama.a"
+.endif
+
MAN1= wdm.1 wdmLogin.1
DAEMONPIC= daemon1-HQ-1280x960.jpg
@@ -79,4 +87,4 @@ post-install:
fi
@${INSTALL_DATA} ${_DISTDIR}/${DAEMONPIC} ${PREFIX}/lib/X11/wdm/pixmaps
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/x11/wdm/files/patch-Login.c b/x11/wdm/files/patch-Login.c
new file mode 100644
index 000000000000..c4b13687859e
--- /dev/null
+++ b/x11/wdm/files/patch-Login.c
@@ -0,0 +1,54 @@
+--- src/Login.c Tue Feb 29 06:17:01 2000
++++ src/Login.c.new Wed Apr 3 22:36:34 2002
+@@ -24,6 +24,9 @@
+ #include <X11/xpm.h>
+ #include <X11/keysym.h>
+ #include <X11/cursorfont.h>
++#ifdef HAVE_XINERAMA
++#include <X11/extensions/Xinerama.h>
++#endif
+ #ifdef HAVE_X11_WINGS_H
+ #include <X11/WINGs.h>
+ #else
+@@ -1195,6 +1198,10 @@
+ int main(int argc, char **argv)
+ {
+ WMScreen *scr;
++ int xine_count; int c;
++#ifdef HAVE_XINERAMA
++ XineramaScreenInfo *xine;
++#endif
+
+ ProgName = argv[0];
+
+@@ -1210,8 +1217,28 @@
+ }
+
+ screen_number = DefaultScreen(dpy);
+- screen_width = DisplayWidth(dpy,screen_number);
+- screen_heigth = DisplayHeight(dpy,screen_number);
++#ifdef HAVE_XINERAMA
++ if (XineramaIsActive(dpy)) {
++ xine = XineramaQueryScreens(dpy, &xine_count);
++
++ if (xine != NULL) {
++ for (c = 0;c < xine_count;c++) {
++ if (xine[c].screen_number == 0) {
++ screen_width = xine[c].width;
++ screen_heigth = xine[c].height;
++ }
++ }
++ } else {
++ screen_width = DisplayWidth(dpy, screen_number);
++ screen_heigth = DisplayHeight(dpy, screen_number);
++ }
++ } else {
++#endif
++ screen_width = DisplayWidth(dpy,screen_number);
++ screen_heigth = DisplayHeight(dpy,screen_number);
++#ifdef HAVE_XINERAMA
++ }
++#endif
+ panel_X = (screen_width - panel_width)/2;
+ panel_Y = (screen_heigth - panel_heigth)/2;
+