Draw: Set dev trial

This commit is contained in:
Martin Duquesnoy 2009-06-23 00:31:32 +02:00
parent 3eacc103ea
commit 0b21569b3a
3 changed files with 25 additions and 3 deletions

View File

@ -54,6 +54,29 @@ draw_text(Drawable d, int x, int y, char* fg, int pad, char *str)
DefaultColormap(dpy, SCREEN), fg, &xftcolor); DefaultColormap(dpy, SCREEN), fg, &xftcolor);
/* Draw the text */ /* 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)); XftDrawStringUtf8(xftd, &xftcolor, font, x, y, (FcChar8 *)str, strlen(str));
/* Free the text color and XftDraw */ /* Free the text color and XftDraw */

View File

@ -247,7 +247,7 @@ mouse_resize(Client *c)
geo.width = ((c->geo.width + (c->geo.x - geo.x) < c->minw) 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->minw && (geo.x = (c->geo.x + c->geo.width) - c->minw)
: c->geo.width + (c->geo.x - geo.x)); : 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); client_geo_hints(&geo, c);

View File

@ -143,8 +143,7 @@ quit(void)
return; return;
} }
/** WMFS main loop: Check stdin and /** WMFS main loop.
* execute the event loop
*/ */
void void
mainloop(void) mainloop(void)