mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-25 01:40:19 -05:00
input: pointer-enter: add comment describing what we're doing
This commit is contained in:
parent
7497e44826
commit
a3d5626256
1 changed files with 6 additions and 0 deletions
6
input.c
6
input.c
|
|
@ -1048,6 +1048,12 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
|
|||
|
||||
switch ((term->active_surface = term_surface_kind(term, surface))) {
|
||||
case TERM_SURF_GRID: {
|
||||
/*
|
||||
* Translate x,y pixel coordinate to a cell coordinate, or -1
|
||||
* if the cursor is outside the grid. I.e. if it is inside the
|
||||
* margins.
|
||||
*/
|
||||
|
||||
if (x < term->margins.left || x >= term->width - term->margins.right)
|
||||
seat->mouse.col = -1;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue