Draw: Set dev trial
This commit is contained in:
parent
3eacc103ea
commit
0b21569b3a
23
src/draw.c
23
src/draw.c
@ -54,6 +54,29 @@ draw_text(Drawable d, int x, int y, char* fg, int pad, char *str)
|
||||
DefaultColormap(dpy, SCREEN), fg, &xftcolor);
|
||||
|
||||
/* Draw the text */
|
||||
/* DEV
|
||||
int i, j;
|
||||
char s[2] = { 0 };
|
||||
char col[8] = { 0 };
|
||||
|
||||
for(i = 0; i < strlen(str); ++i)
|
||||
{
|
||||
if(str[i] == '\\' && str[i + 1] == '#' &&)
|
||||
{
|
||||
++i;
|
||||
for(j = 0; str[i + j] != '\\'; col[j++] = str[i + j]);
|
||||
i += j;
|
||||
printf("-> %s\n", col);
|
||||
}
|
||||
else
|
||||
{
|
||||
s[0] = str[i];
|
||||
XftDrawStringUtf8(xftd, &xftcolor, font, x, y, (FcChar8 *)s, strlen(s));
|
||||
x += textw(s);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
XftDrawStringUtf8(xftd, &xftcolor, font, x, y, (FcChar8 *)str, strlen(str));
|
||||
|
||||
/* Free the text color and XftDraw */
|
||||
|
||||
@ -247,7 +247,7 @@ mouse_resize(Client *c)
|
||||
geo.width = ((c->geo.width + (c->geo.x - geo.x) < c->minw)
|
||||
? c->minw && (geo.x = (c->geo.x + c->geo.width) - c->minw)
|
||||
: c->geo.width + (c->geo.x - geo.x));
|
||||
geo.height = ((ev.xmotion.y - c->geo.y <= 1) ? 1 : ev.xmotion.y - c->geo.y);
|
||||
geo.height = ((ev.xmotion.y - c->geo.y <= c->minh) ? c->minh : ev.xmotion.y - c->geo.y);
|
||||
}
|
||||
|
||||
client_geo_hints(&geo, c);
|
||||
|
||||
@ -143,8 +143,7 @@ quit(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** WMFS main loop: Check stdin and
|
||||
* execute the event loop
|
||||
/** WMFS main loop.
|
||||
*/
|
||||
void
|
||||
mainloop(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user