diff options
author | tobez <tobez@FreeBSD.org> | 2005-03-01 05:32:40 +0800 |
---|---|---|
committer | tobez <tobez@FreeBSD.org> | 2005-03-01 05:32:40 +0800 |
commit | aa4e4e91097b7da2ff4497ebcbbc802bddb95dc7 (patch) | |
tree | 7f9b8e7a8a7db0877fff48c9f9d70c84d293bf26 /x11-wm/tinywm | |
parent | 3f201815a88d47568a8a0942fddb125e7e21e439 (diff) | |
download | freebsd-ports-gnome-aa4e4e91097b7da2ff4497ebcbbc802bddb95dc7.tar.gz freebsd-ports-gnome-aa4e4e91097b7da2ff4497ebcbbc802bddb95dc7.tar.zst freebsd-ports-gnome-aa4e4e91097b7da2ff4497ebcbbc802bddb95dc7.zip |
Fix compilation on i386-4.
Submitted by: maintainer
PR: 78210
Diffstat (limited to 'x11-wm/tinywm')
-rw-r--r-- | x11-wm/tinywm/files/patch-Makefile | 17 | ||||
-rw-r--r-- | x11-wm/tinywm/files/patch-tinywm.c | 44 |
2 files changed, 61 insertions, 0 deletions
diff --git a/x11-wm/tinywm/files/patch-Makefile b/x11-wm/tinywm/files/patch-Makefile new file mode 100644 index 000000000000..013c653deda7 --- /dev/null +++ b/x11-wm/tinywm/files/patch-Makefile @@ -0,0 +1,17 @@ + +$FreeBSD$ + +--- Makefile.orig ++++ Makefile +@@ -1,8 +1,8 @@ +-X11=/usr/X11R6 +-CCOPTS=-Os -pedantic -Wall -std=gnu99 ++PREFIX?=/usr/X11R6 ++CFLAGS?=-Os -pedantic -Wall + + all: +- $(CC) $(CCOPTS) -I$(X11)/include -L$(X11)/lib -lX11 -o tinywm tinywm.c ++ $(CC) $(CFLAGS) -I$(PREFIX)/include -L$(PREFIX)/lib -lX11 -o tinywm tinywm.c + + clean: + rm -f tinywm diff --git a/x11-wm/tinywm/files/patch-tinywm.c b/x11-wm/tinywm/files/patch-tinywm.c new file mode 100644 index 000000000000..9c01ec1ac0cc --- /dev/null +++ b/x11-wm/tinywm/files/patch-tinywm.c @@ -0,0 +1,44 @@ + +$FreeBSD$ + +--- tinywm.c.orig ++++ tinywm.c +@@ -12,12 +12,15 @@ + + int main() + { ++ int xdiff, ydiff; + Display * dpy = XOpenDisplay(0); ++ XWindowAttributes attr; ++ XButtonEvent start; ++ XEvent ev; ++ Window root = DefaultRootWindow(dpy); + + if(!dpy) return 1; + +- Window root = DefaultRootWindow(dpy); +- + XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym("F1")), Mod1Mask, root, + True, GrabModeAsync, GrabModeAsync); + XGrabButton(dpy, 1, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync, +@@ -25,9 +28,6 @@ + XGrabButton(dpy, 3, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync, + GrabModeAsync, None, None); + +- XWindowAttributes attr; +- XButtonEvent start; +- XEvent ev; + for(;;) + { + XNextEvent(dpy, &ev); +@@ -44,8 +44,8 @@ + else if(ev.type == MotionNotify) + { + while(XCheckTypedEvent(dpy, MotionNotify, &ev)); +- int xdiff = ev.xbutton.x_root - start.x_root; +- int ydiff = ev.xbutton.y_root - start.y_root; ++ xdiff = ev.xbutton.x_root - start.x_root; ++ ydiff = ev.xbutton.y_root - start.y_root; + XMoveResizeWindow(dpy, ev.xmotion.window, + attr.x + (start.button==1 ? xdiff : 0), + attr.y + (start.button==1 ? ydiff : 0), |