mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Identified and fixed a few more cross-compilation issues
This commit is contained in:
parent
7ce66bf122
commit
df57bdeb64
5
drw.c
5
drw.c
@ -17,10 +17,13 @@ static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0}
|
||||
static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
|
||||
static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
||||
#endif // BAR_PANGO_PATCH
|
||||
|
||||
#if BAR_POWERLINE_TAGS_PATCH || BAR_POWERLINE_STATUS_PATCH
|
||||
Clr transcheme[3];
|
||||
#endif // BAR_POWERLINE_TAGS_PATCH | BAR_POWERLINE_STATUS_PATCH
|
||||
|
||||
#if !BAR_PANGO_PATCH
|
||||
static long
|
||||
utf8decodebyte(const char c, size_t *i)
|
||||
{
|
||||
@ -333,7 +336,7 @@ drw_scm_create(
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !PANGO_PATCH
|
||||
#if !BAR_PANGO_PATCH
|
||||
void
|
||||
drw_setfontset(Drw *drw, Fnt *set)
|
||||
{
|
||||
|
2
drw.h
2
drw.h
@ -83,7 +83,7 @@ Cur *drw_cur_create(Drw *drw, int shape);
|
||||
void drw_cur_free(Drw *drw, Cur *cursor);
|
||||
|
||||
/* Drawing context manipulation */
|
||||
#if !PANGO_PATCH
|
||||
#if !BAR_PANGO_PATCH
|
||||
void drw_setfontset(Drw *drw, Fnt *set);
|
||||
#endif // BAR_PANGO_PATCH
|
||||
void drw_setscheme(Drw *drw, Clr *scm);
|
||||
|
6
dwm.c
6
dwm.c
@ -1110,15 +1110,13 @@ clientmessage(XEvent *e)
|
||||
if (cme->message_type == netatom[NetWMState]) {
|
||||
if (cme->data.l[1] == netatom[NetWMFullscreen]
|
||||
|| cme->data.l[2] == netatom[NetWMFullscreen]) {
|
||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
if (c->fakefullscreen)
|
||||
resizeclient(c, c->x, c->y, c->w, c->h);
|
||||
else
|
||||
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */
|
||||
#if !FAKEFULLSCREEN_PATCH
|
||||
&& !c->isfullscreen
|
||||
#endif // !FAKEFULLSCREEN_PATCH
|
||||
)));
|
||||
#else
|
||||
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||
@ -3270,7 +3268,7 @@ tagmon(const Arg *arg)
|
||||
c->isfullscreen = 0;
|
||||
sendmon(c, dirtomon(arg->i));
|
||||
c->isfullscreen = 1;
|
||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
if (!c->fakefullscreen) {
|
||||
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
|
||||
XRaiseWindow(dpy, c->win);
|
||||
|
@ -258,12 +258,14 @@ flextitlecalculate(
|
||||
|
||||
if (i < m->nmaster)
|
||||
clientsnmaster++;
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
else if (m->nstack) {
|
||||
if (clientsnstack < m->nstack)
|
||||
clientsnstack++;
|
||||
else
|
||||
clientsnstack2++;
|
||||
}
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
else if (i % 2)
|
||||
clientsnstack++;
|
||||
else
|
||||
@ -366,7 +368,12 @@ flextitlecalculate(
|
||||
r = num % den; // weight rest width
|
||||
rw = r / n; // rest incr per client
|
||||
rr = r % n; // rest rest
|
||||
if ((!center && !dualstack) || (center && n <= m->nmaster + (m->nstack ? m->nstack : 1))) {
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
if ((!center && !dualstack) || (center && n <= m->nmaster + (m->nstack ? m->nstack : 1)))
|
||||
#else
|
||||
if ((!center && !dualstack) || (center && n <= m->nmaster + 1))
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
{
|
||||
clientsnstack += clientsnstack2;
|
||||
clientsnstack2 = 0;
|
||||
if (groupactive == GRP_STACK2)
|
||||
|
@ -15,11 +15,11 @@ int
|
||||
width_status2d_es(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
int width;
|
||||
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
width = status2dtextlength(rawestext);
|
||||
#else
|
||||
width = status2dtextlength(estext);
|
||||
#endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
|
||||
#endif // BAR_STATUSCMD_PATCH
|
||||
return width ? width + lrpad : 0;
|
||||
}
|
||||
#endif // BAR_EXTRASTATUS_PATCH
|
||||
@ -38,11 +38,11 @@ draw_status2d(Bar *bar, BarDrawArg *a)
|
||||
int
|
||||
draw_status2d_es(Bar *bar, BarDrawArg *a)
|
||||
{
|
||||
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
return drawstatusbar(a->x, rawestext);
|
||||
#else
|
||||
return drawstatusbar(a->x, estext);
|
||||
#endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
|
||||
#endif // BAR_STATUSCMD_PATCH
|
||||
}
|
||||
#endif // BAR_EXTRASTATUS_PATCH
|
||||
|
||||
|
@ -166,7 +166,7 @@ incrivgaps(const Arg *arg)
|
||||
);
|
||||
}
|
||||
|
||||
#if CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || NROWGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT || (VANITYGAPS_MONOCLE_PATCH && MONOCLE_LAYOUT)
|
||||
#if DRAGMFACT_PATCH || CENTEREDMASTER_LAYOUT || CENTEREDFLOATINGMASTER_LAYOUT || COLUMNS_LAYOUT || DECK_LAYOUT || FIBONACCI_DWINDLE_LAYOUT || FIBONACCI_SPIRAL_LAYOUT || GAPPLESSGRID_LAYOUT || NROWGRID_LAYOUT || HORIZGRID_LAYOUT || BSTACK_LAYOUT || BSTACKHORIZ_LAYOUT || GRIDMODE_LAYOUT || FLEXTILE_DELUXE_LAYOUT || TILE_LAYOUT || (VANITYGAPS_MONOCLE_PATCH && MONOCLE_LAYOUT)
|
||||
static void
|
||||
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user