Alopex

Check-in [941531a4c3]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:crushed optimizer-revealed bug
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256:941531a4c3645b4435a636b1a0790d329bd5dace823dc731c4719437f7799c44
User & Date: jesse@mccluresk9.com 2014-02-13 22:42:09
Context
2014-02-13
22:55
simplified to rely on built-in build rules check-in: 86a9ab735d user: jesse@mccluresk9.com tags: trunk, master
22:42
crushed optimizer-revealed bug check-in: 941531a4c3 user: jesse@mccluresk9.com tags: trunk, master
20:30
echo flags for troubleshooting check-in: db67435bc0 user: jesse@mccluresk9.com tags: trunk, master
Changes

Changes to Makefile.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
MODULES  =  actions alopex atoms config draw tile xlib
#ICONS		=  tag cpu mem aud bat wfi clk
HEADERS  =  alopex.h actions.h
MANPAGES =  alopex.1
VPATH    =  src:doc

${PROG}: ${MODULES:%=%.o}
	@echo CFLAGS ${CFLAGS}
	@echo LDFLAGS ${LDFLAGS}
	@echo -e "\033[1;34m  ->\033[0m Linking alopex"
	@cd src && ${CC} -o ../${PROG} ${MODULES:%=%.o} ${LDFLAGS}

icons.png: ${ICONS:%=%.svg}
	@echo -e "\033[1;34m  ->\033[0m Building icons.png"
	@cd icons && ./makeicons








<
<







8
9
10
11
12
13
14


15
16
17
18
19
20
21
MODULES  =  actions alopex atoms config draw tile xlib
#ICONS		=  tag cpu mem aud bat wfi clk
HEADERS  =  alopex.h actions.h
MANPAGES =  alopex.1
VPATH    =  src:doc

${PROG}: ${MODULES:%=%.o}


	@echo -e "\033[1;34m  ->\033[0m Linking alopex"
	@cd src && ${CC} -o ../${PROG} ${MODULES:%=%.o} ${LDFLAGS}

icons.png: ${ICONS:%=%.svg}
	@echo -e "\033[1;34m  ->\033[0m Building icons.png"
	@cd icons && ./makeicons

Changes to src/alopex.h.

7
8
9
10
11
12
13

14
15
16
17
18
19
20
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <locale.h>
#include <math.h>
#include <signal.h>
#include <sys/types.h>

#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <X11/Xresource.h>







>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <locale.h>
#include <math.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <X11/Xresource.h>

Changes to src/xlib.c.

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	free(tmp);
	counts = realloc(counts, (i+1) * sizeof(int *));
	counts[i] = -1;
	ncounts = i+1;
	/* get monitor geometries */
	mons = NULL;
	XineramaScreenInfo *geom = XineramaQueryScreens(dpy, &n);
	int minX, minY, maxX, maxY;
	for(i = 0; i < n; i++) {
		mons = realloc(mons, (i+1) * sizeof(Monitor));
		memset(&mons[i], 0, sizeof(Monitor));
		mons[i].x = geom[i].x_org;
		mons[i].y = geom[i].y_org;
		mons[i].w = geom[i].width;
		mons[i].h = geom[i].height;







|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	free(tmp);
	counts = realloc(counts, (i+1) * sizeof(int *));
	counts[i] = -1;
	ncounts = i+1;
	/* get monitor geometries */
	mons = NULL;
	XineramaScreenInfo *geom = XineramaQueryScreens(dpy, &n);
	int minX = 0, minY = 0, maxX = 0, maxY = 0;
	for(i = 0; i < n; i++) {
		mons = realloc(mons, (i+1) * sizeof(Monitor));
		memset(&mons[i], 0, sizeof(Monitor));
		mons[i].x = geom[i].x_org;
		mons[i].y = geom[i].y_org;
		mons[i].w = geom[i].width;
		mons[i].h = geom[i].height;