Merge pull request #20 from LemonBoy/master
Merge fix for persistent clickable areas
This commit is contained in:
commit
38f69d853a
|
@ -404,10 +404,9 @@ area_t *
|
||||||
area_get (xcb_window_t win, const int btn, const int x)
|
area_get (xcb_window_t win, const int btn, const int x)
|
||||||
{
|
{
|
||||||
// Looping backwards ensures that we get the innermost area first
|
// 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];
|
area_t *a = &area_stack.area[i];
|
||||||
if (a->window == win && a->button == btn
|
if (a->window == win && a->button == btn && x >= a->begin && x < a->end)
|
||||||
&& x >= a->begin && x < a->end)
|
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -698,7 +697,7 @@ parse (char *text)
|
||||||
ucs = 0xfffd;
|
ucs = 0xfffd;
|
||||||
p += 5;
|
p += 5;
|
||||||
}
|
}
|
||||||
// Siz byte utf8 sequence
|
// Six byte utf8 sequence
|
||||||
else if ((utf[0] & 0xfe) == 0xfc) {
|
else if ((utf[0] & 0xfe) == 0xfc) {
|
||||||
ucs = 0xfffd;
|
ucs = 0xfffd;
|
||||||
p += 6;
|
p += 6;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user