summaryrefslogtreecommitdiff
path: root/x11-wm/tinywm
diff options
context:
space:
mode:
authorAnton Berezin <tobez@FreeBSD.org>2005-02-28 21:32:40 +0000
committerAnton Berezin <tobez@FreeBSD.org>2005-02-28 21:32:40 +0000
commitffcbb5ca66c4bee1c2b113913a1208cd9f034a27 (patch)
treec317db3d229865ef2ab07fe0b85c89a275fc0513 /x11-wm/tinywm
parentRemove extra locales directories. (diff)
Fix compilation on i386-4.
Submitted by: maintainer PR: 78210
Notes
Notes: svn path=/head/; revision=130045
Diffstat (limited to 'x11-wm/tinywm')
-rw-r--r--x11-wm/tinywm/files/patch-Makefile17
-rw-r--r--x11-wm/tinywm/files/patch-tinywm.c44
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),