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 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 utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||||
static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
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
|
#if BAR_POWERLINE_TAGS_PATCH || BAR_POWERLINE_STATUS_PATCH
|
||||||
Clr transcheme[3];
|
Clr transcheme[3];
|
||||||
#endif // BAR_POWERLINE_TAGS_PATCH | BAR_POWERLINE_STATUS_PATCH
|
#endif // BAR_POWERLINE_TAGS_PATCH | BAR_POWERLINE_STATUS_PATCH
|
||||||
|
|
||||||
|
#if !BAR_PANGO_PATCH
|
||||||
static long
|
static long
|
||||||
utf8decodebyte(const char c, size_t *i)
|
utf8decodebyte(const char c, size_t *i)
|
||||||
{
|
{
|
||||||
@ -333,7 +336,7 @@ drw_scm_create(
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !PANGO_PATCH
|
#if !BAR_PANGO_PATCH
|
||||||
void
|
void
|
||||||
drw_setfontset(Drw *drw, Fnt *set)
|
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);
|
void drw_cur_free(Drw *drw, Cur *cursor);
|
||||||
|
|
||||||
/* Drawing context manipulation */
|
/* Drawing context manipulation */
|
||||||
#if !PANGO_PATCH
|
#if !BAR_PANGO_PATCH
|
||||||
void drw_setfontset(Drw *drw, Fnt *set);
|
void drw_setfontset(Drw *drw, Fnt *set);
|
||||||
#endif // BAR_PANGO_PATCH
|
#endif // BAR_PANGO_PATCH
|
||||||
void drw_setscheme(Drw *drw, Clr *scm);
|
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->message_type == netatom[NetWMState]) {
|
||||||
if (cme->data.l[1] == netatom[NetWMFullscreen]
|
if (cme->data.l[1] == netatom[NetWMFullscreen]
|
||||||
|| cme->data.l[2] == netatom[NetWMFullscreen]) {
|
|| cme->data.l[2] == netatom[NetWMFullscreen]) {
|
||||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||||
if (c->fakefullscreen)
|
if (c->fakefullscreen)
|
||||||
resizeclient(c, c->x, c->y, c->w, c->h);
|
resizeclient(c, c->x, c->y, c->w, c->h);
|
||||||
else
|
else
|
||||||
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||||
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */
|
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */
|
||||||
#if !FAKEFULLSCREEN_PATCH
|
|
||||||
&& !c->isfullscreen
|
&& !c->isfullscreen
|
||||||
#endif // !FAKEFULLSCREEN_PATCH
|
|
||||||
)));
|
)));
|
||||||
#else
|
#else
|
||||||
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||||
@ -3270,7 +3268,7 @@ tagmon(const Arg *arg)
|
|||||||
c->isfullscreen = 0;
|
c->isfullscreen = 0;
|
||||||
sendmon(c, dirtomon(arg->i));
|
sendmon(c, dirtomon(arg->i));
|
||||||
c->isfullscreen = 1;
|
c->isfullscreen = 1;
|
||||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||||
if (!c->fakefullscreen) {
|
if (!c->fakefullscreen) {
|
||||||
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
|
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
|
||||||
XRaiseWindow(dpy, c->win);
|
XRaiseWindow(dpy, c->win);
|
||||||
|
@ -258,12 +258,14 @@ flextitlecalculate(
|
|||||||
|
|
||||||
if (i < m->nmaster)
|
if (i < m->nmaster)
|
||||||
clientsnmaster++;
|
clientsnmaster++;
|
||||||
|
#if FLEXTILE_DELUXE_LAYOUT
|
||||||
else if (m->nstack) {
|
else if (m->nstack) {
|
||||||
if (clientsnstack < m->nstack)
|
if (clientsnstack < m->nstack)
|
||||||
clientsnstack++;
|
clientsnstack++;
|
||||||
else
|
else
|
||||||
clientsnstack2++;
|
clientsnstack2++;
|
||||||
}
|
}
|
||||||
|
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||||
else if (i % 2)
|
else if (i % 2)
|
||||||
clientsnstack++;
|
clientsnstack++;
|
||||||
else
|
else
|
||||||
@ -366,7 +368,12 @@ flextitlecalculate(
|
|||||||
r = num % den; // weight rest width
|
r = num % den; // weight rest width
|
||||||
rw = r / n; // rest incr per client
|
rw = r / n; // rest incr per client
|
||||||
rr = r % n; // rest rest
|
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;
|
clientsnstack += clientsnstack2;
|
||||||
clientsnstack2 = 0;
|
clientsnstack2 = 0;
|
||||||
if (groupactive == GRP_STACK2)
|
if (groupactive == GRP_STACK2)
|
||||||
|
@ -15,11 +15,11 @@ int
|
|||||||
width_status2d_es(Bar *bar, BarWidthArg *a)
|
width_status2d_es(Bar *bar, BarWidthArg *a)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
|
#if BAR_STATUSCMD_PATCH
|
||||||
width = status2dtextlength(rawestext);
|
width = status2dtextlength(rawestext);
|
||||||
#else
|
#else
|
||||||
width = status2dtextlength(estext);
|
width = status2dtextlength(estext);
|
||||||
#endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
|
#endif // BAR_STATUSCMD_PATCH
|
||||||
return width ? width + lrpad : 0;
|
return width ? width + lrpad : 0;
|
||||||
}
|
}
|
||||||
#endif // BAR_EXTRASTATUS_PATCH
|
#endif // BAR_EXTRASTATUS_PATCH
|
||||||
@ -38,11 +38,11 @@ draw_status2d(Bar *bar, BarDrawArg *a)
|
|||||||
int
|
int
|
||||||
draw_status2d_es(Bar *bar, BarDrawArg *a)
|
draw_status2d_es(Bar *bar, BarDrawArg *a)
|
||||||
{
|
{
|
||||||
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
|
#if BAR_STATUSCMD_PATCH
|
||||||
return drawstatusbar(a->x, rawestext);
|
return drawstatusbar(a->x, rawestext);
|
||||||
#else
|
#else
|
||||||
return drawstatusbar(a->x, estext);
|
return drawstatusbar(a->x, estext);
|
||||||
#endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
|
#endif // BAR_STATUSCMD_PATCH
|
||||||
}
|
}
|
||||||
#endif // BAR_EXTRASTATUS_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
|
static void
|
||||||
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user