Merge pull request #20 from LemonBoy/master

Merge fix for persistent clickable areas
This commit is contained in:
Krypt0n 2015-12-31 18:47:30 +01:00
commit 38f69d853a

View File

@ -404,10 +404,9 @@ area_t *
area_get (xcb_window_t win, const int btn, const int x)
{
// Looping backwards ensures that we get the innermost area first
for (int i = area_stack.at; i >= 0; i--) {
for (int i = area_stack.at - 1; i >= 0; i--) {
area_t *a = &area_stack.area[i];
if (a->window == win && a->button == btn
&& x >= a->begin && x < a->end)
if (a->window == win && a->button == btn && x >= a->begin && x < a->end)
return a;
}
return NULL;
@ -698,7 +697,7 @@ parse (char *text)
ucs = 0xfffd;
p += 5;
}
// Siz byte utf8 sequence
// Six byte utf8 sequence
else if ((utf[0] & 0xfe) == 0xfc) {
ucs = 0xfffd;
p += 6;