replace dmenu-alpha diff file for a unbroken one
note - gcc still throws up a non-critical warning. fixining it would be nice
This commit is contained in:
parent
f8e49f90da
commit
ecdde186f7
@ -24,8 +24,21 @@ index 1edb647..697d511 100644
|
|||||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||||
static unsigned int lines = 0;
|
static unsigned int lines = 0;
|
||||||
|
|
||||||
|
diff --git a/config.mk b/config.mk
|
||||||
|
index 566348b..72c1b3d 100644
|
||||||
|
--- a/config.mk
|
||||||
|
+++ b/config.mk
|
||||||
|
@@ -21,7 +21,7 @@ FREETYPEINC = /usr/include/freetype2
|
||||||
|
|
||||||
|
# includes and libs
|
||||||
|
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||||
|
-LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
|
||||||
|
+LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) -lXrender
|
||||||
|
|
||||||
|
# flags
|
||||||
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
|
||||||
diff --git a/dmenu.c b/dmenu.c
|
diff --git a/dmenu.c b/dmenu.c
|
||||||
index 65f25ce..3e56e1a 100644
|
index 7cf253b..3acfad8 100644
|
||||||
--- a/dmenu.c
|
--- a/dmenu.c
|
||||||
+++ b/dmenu.c
|
+++ b/dmenu.c
|
||||||
@@ -10,6 +10,7 @@
|
@@ -10,6 +10,7 @@
|
||||||
@ -60,9 +73,9 @@ index 65f25ce..3e56e1a 100644
|
|||||||
static char *(*fstrstr)(const char *, const char *) = strstr;
|
static char *(*fstrstr)(const char *, const char *) = strstr;
|
||||||
+static void xinitvisual();
|
+static void xinitvisual();
|
||||||
|
|
||||||
static void
|
static unsigned int
|
||||||
appenditem(struct item *item, struct item **list, struct item **last)
|
textw_clamp(const char *str, unsigned int n)
|
||||||
@@ -602,7 +611,7 @@ setup(void)
|
@@ -623,7 +632,7 @@ setup(void)
|
||||||
#endif
|
#endif
|
||||||
/* init appearance */
|
/* init appearance */
|
||||||
for (j = 0; j < SchemeLast; j++)
|
for (j = 0; j < SchemeLast; j++)
|
||||||
@ -71,7 +84,7 @@ index 65f25ce..3e56e1a 100644
|
|||||||
|
|
||||||
clip = XInternAtom(dpy, "CLIPBOARD", False);
|
clip = XInternAtom(dpy, "CLIPBOARD", False);
|
||||||
utf8 = XInternAtom(dpy, "UTF8_STRING", False);
|
utf8 = XInternAtom(dpy, "UTF8_STRING", False);
|
||||||
@@ -640,6 +649,7 @@ setup(void)
|
@@ -661,6 +670,7 @@ setup(void)
|
||||||
x = info[i].x_org;
|
x = info[i].x_org;
|
||||||
y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
|
y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
|
||||||
mw = info[i].width;
|
mw = info[i].width;
|
||||||
@ -79,7 +92,7 @@ index 65f25ce..3e56e1a 100644
|
|||||||
XFree(info);
|
XFree(info);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@@ -657,11 +667,13 @@ setup(void)
|
@@ -678,11 +688,13 @@ setup(void)
|
||||||
|
|
||||||
/* create menu window */
|
/* create menu window */
|
||||||
swa.override_redirect = True;
|
swa.override_redirect = True;
|
||||||
@ -88,16 +101,15 @@ index 65f25ce..3e56e1a 100644
|
|||||||
+ swa.border_pixel = 0;
|
+ swa.border_pixel = 0;
|
||||||
+ swa.colormap = cmap;
|
+ swa.colormap = cmap;
|
||||||
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
|
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
|
||||||
- win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
|
||||||
- CopyFromParent, CopyFromParent, CopyFromParent,
|
- CopyFromParent, CopyFromParent, CopyFromParent,
|
||||||
- CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
- CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
||||||
+ win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width,
|
|
||||||
+ depth, CopyFromParent, visual,
|
+ depth, CopyFromParent, visual,
|
||||||
+ CWOverrideRedirect | CWBackPixel | CWBorderPixel | CWColormap | CWEventMask, &swa);
|
+ CWOverrideRedirect | CWBackPixel | CWBorderPixel | CWColormap | CWEventMask, &swa);
|
||||||
XSetClassHint(dpy, win, &ch);
|
XSetClassHint(dpy, win, &ch);
|
||||||
|
|
||||||
|
|
||||||
@@ -747,7 +759,8 @@ main(int argc, char *argv[])
|
@@ -767,7 +779,8 @@ main(int argc, char *argv[])
|
||||||
if (!XGetWindowAttributes(dpy, parentwin, &wa))
|
if (!XGetWindowAttributes(dpy, parentwin, &wa))
|
||||||
die("could not get embedding window attributes: 0x%lx",
|
die("could not get embedding window attributes: 0x%lx",
|
||||||
parentwin);
|
parentwin);
|
||||||
@ -107,7 +119,7 @@ index 65f25ce..3e56e1a 100644
|
|||||||
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
|
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
|
||||||
die("no fonts could be loaded.");
|
die("no fonts could be loaded.");
|
||||||
lrpad = drw->fonts->h;
|
lrpad = drw->fonts->h;
|
||||||
@@ -769,3 +782,40 @@ main(int argc, char *argv[])
|
@@ -789,3 +802,40 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
return 1; /* unreachable */
|
return 1; /* unreachable */
|
||||||
}
|
}
|
||||||
@ -149,7 +161,7 @@ index 65f25ce..3e56e1a 100644
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/drw.c b/drw.c
|
diff --git a/drw.c b/drw.c
|
||||||
index 4cdbcbe..fe3aadd 100644
|
index a58a2b4..42700e5 100644
|
||||||
--- a/drw.c
|
--- a/drw.c
|
||||||
+++ b/drw.c
|
+++ b/drw.c
|
||||||
@@ -61,7 +61,7 @@ utf8decode(const char *c, long *u, size_t clen)
|
@@ -61,7 +61,7 @@ utf8decode(const char *c, long *u, size_t clen)
|
||||||
@ -184,7 +196,7 @@ index 4cdbcbe..fe3aadd 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -194,21 +197,22 @@ drw_fontset_free(Fnt *font)
|
@@ -181,21 +184,22 @@ drw_fontset_free(Fnt *font)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -211,7 +223,7 @@ index 4cdbcbe..fe3aadd 100644
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
Clr *ret;
|
Clr *ret;
|
||||||
@@ -218,7 +222,7 @@ drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
@@ -205,7 +209,7 @@ drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < clrcount; i++)
|
for (i = 0; i < clrcount; i++)
|
||||||
@ -220,7 +232,7 @@ index 4cdbcbe..fe3aadd 100644
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,9 +278,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
@@ -263,9 +267,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
||||||
} else {
|
} else {
|
||||||
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
||||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||||
@ -232,7 +244,7 @@ index 4cdbcbe..fe3aadd 100644
|
|||||||
w -= lpad;
|
w -= lpad;
|
||||||
}
|
}
|
||||||
diff --git a/drw.h b/drw.h
|
diff --git a/drw.h b/drw.h
|
||||||
index 4c67419..f6fa5cd 100644
|
index fd7631b..48f2f93 100644
|
||||||
--- a/drw.h
|
--- a/drw.h
|
||||||
+++ b/drw.h
|
+++ b/drw.h
|
||||||
@@ -20,6 +20,9 @@ typedef struct {
|
@@ -20,6 +20,9 @@ typedef struct {
|
||||||
@ -254,7 +266,7 @@ index 4c67419..f6fa5cd 100644
|
|||||||
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
||||||
void drw_free(Drw *drw);
|
void drw_free(Drw *drw);
|
||||||
|
|
||||||
@@ -38,8 +41,8 @@ unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
@@ -39,8 +42,8 @@ unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int
|
||||||
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
|
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
|
||||||
|
|
||||||
/* Colorscheme abstraction */
|
/* Colorscheme abstraction */
|
Loading…
Reference in New Issue
Block a user