re-add focus follows mouse handling

This commit is contained in:
Michael Stapelberg
2010-04-13 18:43:37 +02:00
parent eec762ea8f
commit 8e5a831e27
7 changed files with 113 additions and 77 deletions

View File

@ -31,6 +31,13 @@ int max(int a, int b) {
return (a > b ? a : b);
}
bool rect_contains(Rect rect, uint32_t x, uint32_t y) {
return (x >= rect.x &&
x <= (rect.x + rect.width) &&
y >= rect.y &&
y <= (rect.y + rect.height));
}
/*
* Updates *destination with new_value and returns true if it was changed or false
* if it was the same