| 918 |
918 |
|
text[0] = '\0'; |
| 919 |
919 |
|
if (!XGetTextProperty(dpy, w, &name, atom) || !name.nitems) |
| 920 |
920 |
|
return 0; |
| 921 |
|
- |
if (name.encoding == XA_STRING) |
|
921 |
+ |
if (name.encoding == XA_STRING) { |
| 922 |
922 |
|
strncpy(text, (char *)name.value, size - 1); |
| 923 |
|
- |
else { |
| 924 |
|
- |
if (XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) { |
| 925 |
|
- |
strncpy(text, *list, size - 1); |
| 926 |
|
- |
XFreeStringList(list); |
| 927 |
|
- |
} |
|
923 |
+ |
} else if (XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) { |
|
924 |
+ |
strncpy(text, *list, size - 1); |
|
925 |
+ |
XFreeStringList(list); |
| 928 |
926 |
|
} |
| 929 |
927 |
|
text[size - 1] = '\0'; |
| 930 |
928 |
|
XFree(name.value); |
|
| 1099 |
1097 |
|
static XWindowAttributes wa; |
| 1100 |
1098 |
|
XMapRequestEvent *ev = &e->xmaprequest; |
| 1101 |
1099 |
|
|
| 1102 |
|
- |
if (!XGetWindowAttributes(dpy, ev->window, &wa)) |
| 1103 |
|
- |
return; |
| 1104 |
|
- |
if (wa.override_redirect) |
|
1100 |
+ |
if (!XGetWindowAttributes(dpy, ev->window, &wa) || wa.override_redirect) |
| 1105 |
1101 |
|
return; |
| 1106 |
1102 |
|
if (!wintoclient(ev->window)) |
| 1107 |
1103 |
|
manage(ev->window, &wa); |
|
| 1602 |
1598 |
|
grabkeys(); |
| 1603 |
1599 |
|
focus(NULL); |
| 1604 |
1600 |
|
} |
| 1605 |
|
- |
|
| 1606 |
1601 |
|
|
| 1607 |
1602 |
|
void |
| 1608 |
1603 |
|
seturgent(Client *c, int urg) |
|
| 2124 |
2119 |
|
{ |
| 2125 |
2120 |
|
Client *c = selmon->sel; |
| 2126 |
2121 |
|
|
| 2127 |
|
- |
if (!selmon->lt[selmon->sellt]->arrange |
| 2128 |
|
- |
|| (selmon->sel && selmon->sel->isfloating)) |
|
2122 |
+ |
if (!selmon->lt[selmon->sellt]->arrange || !c || c->isfloating) |
| 2129 |
2123 |
|
return; |
| 2130 |
|
- |
if (c == nexttiled(selmon->clients)) |
| 2131 |
|
- |
if (!c || !(c = nexttiled(c->next))) |
| 2132 |
|
- |
return; |
|
2124 |
+ |
if (c == nexttiled(selmon->clients) && !(c = nexttiled(c->next))) |
|
2125 |
+ |
return; |
| 2133 |
2126 |
|
pop(c); |
| 2134 |
2127 |
|
} |
| 2135 |
2128 |
|
|