mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 10:51:55 +00:00
...
This commit is contained in:
parent
131a6ba8c6
commit
5e845a49a0
1 changed files with 3 additions and 1 deletions
|
|
@ -257,7 +257,9 @@ static void
|
|||
border_contains_mouse(BorderRect *br, double tolerance, Edge *edges) {
|
||||
double x = global_state.callback_os_window->mouse_x, y = global_state.callback_os_window->mouse_y;
|
||||
if ((int)br->px.left - tolerance <= x && x < (int)br->px.right + tolerance && (int)br->px.top - tolerance <= y && y < (int)br->px.bottom + tolerance) {
|
||||
if (br->px.right - br->px.left > br->px.bottom - br->px.top) *edges |= br->border_type < 1 ? LEFT_EDGE : RIGHT_EDGE; else *edges |= br->border_type < 1 ? TOP_EDGE : BOTTOM_EDGE;
|
||||
if (br->px.right - br->px.left < br->px.bottom - br->px.top)
|
||||
*edges |= br->border_type < 1 ? LEFT_EDGE : RIGHT_EDGE;
|
||||
else *edges |= br->border_type < 1 ? TOP_EDGE : BOTTOM_EDGE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue