From 0b21569b3a4fe2f489d77fccf11a06a78a8c8dec Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Tue, 23 Jun 2009 00:31:32 +0200 Subject: [PATCH] Draw: Set dev trial --- src/draw.c | 23 +++++++++++++++++++++++ src/mouse.c | 2 +- src/wmfs.c | 3 +-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/draw.c b/src/draw.c index 402d0d2..804e570 100644 --- a/src/draw.c +++ b/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 */ diff --git a/src/mouse.c b/src/mouse.c index b0965a6..9eb452c 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -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); diff --git a/src/wmfs.c b/src/wmfs.c index 6951a51..d61f839 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -143,8 +143,7 @@ quit(void) return; } -/** WMFS main loop: Check stdin and - * execute the event loop +/** WMFS main loop. */ void mainloop(void)