mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
removed Xutf8 crap, that is totally braindamaged what 'those X morns' have designed
This commit is contained in:
parent
481c0f1b12
commit
4beb05d262
@ -18,10 +18,20 @@ vector_of_clients(ClientVector *cv)
|
||||
return (Vector *) cv;
|
||||
}
|
||||
|
||||
static void
|
||||
update_client_name(Client *c)
|
||||
{
|
||||
XTextProperty name;
|
||||
XGetTextProperty(dpy, c->win, &name, XA_WM_NAME);
|
||||
if(name.value) {
|
||||
cext_strlcpy(c->name, (char *)name.value, sizeof(c->name));
|
||||
free(name.value);
|
||||
}
|
||||
}
|
||||
|
||||
Client *
|
||||
create_client(Window w, XWindowAttributes *wa)
|
||||
{
|
||||
XTextProperty name;
|
||||
Client *c = (Client *) cext_emallocz(sizeof(Client));
|
||||
XSetWindowAttributes fwa;
|
||||
XClassHint ch;
|
||||
@ -41,11 +51,7 @@ create_client(Window w, XWindowAttributes *wa)
|
||||
if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags)
|
||||
c->size.flags = PSize;
|
||||
XAddToSaveSet(dpy, c->win);
|
||||
XGetWMName(dpy, c->win, &name);
|
||||
if(name.value) {
|
||||
cext_strlcpy(c->name, (char *)name.value, sizeof(c->name));
|
||||
free(name.value);
|
||||
}
|
||||
update_client_name(c);
|
||||
if(XGetClassHint(dpy, c->win, &ch)) {
|
||||
snprintf(c->classinst, sizeof(c->classinst), "%s:%s", ch.res_class,
|
||||
ch.res_name);
|
||||
@ -180,7 +186,6 @@ kill_client(Client * c)
|
||||
void
|
||||
prop_client(Client *c, XPropertyEvent *e)
|
||||
{
|
||||
XTextProperty name;
|
||||
long msize;
|
||||
|
||||
if(e->atom == wm_atom[WMProtocols]) {
|
||||
@ -190,11 +195,7 @@ prop_client(Client *c, XPropertyEvent *e)
|
||||
}
|
||||
switch (e->atom) {
|
||||
case XA_WM_NAME:
|
||||
XGetWMName(dpy, c->win, &name);
|
||||
if(name.value) {
|
||||
cext_strlcpy(c->name, (char*) name.value, sizeof(c->name));
|
||||
free(name.value);
|
||||
}
|
||||
update_client_name(c);
|
||||
if(c->frame.size)
|
||||
draw_client(c);
|
||||
break;
|
||||
|
@ -102,14 +102,7 @@ xdrawtext(Display *dpy, BlitzDraw *d)
|
||||
}
|
||||
XSetBackground(dpy, d->gc, d->color.bg);
|
||||
XSetForeground(dpy, d->gc, d->color.fg);
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
if(d->font.set)
|
||||
Xutf8DrawString(dpy, d->drawable, d->font.set, d->gc, x, y, text, len);
|
||||
else
|
||||
XDrawString(dpy, d->drawable, d->gc, x, y, text, len);
|
||||
#else
|
||||
XDrawString(dpy, d->drawable, d->gc, x, y, text, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user