mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
input: scale coordinates in wl_pointer_enter()
This commit is contained in:
parent
2d6369482e
commit
f862f173f5
1 changed files with 2 additions and 2 deletions
4
input.c
4
input.c
|
|
@ -383,8 +383,8 @@ wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
|
|||
{
|
||||
struct terminal *term = data;
|
||||
|
||||
int x = wl_fixed_to_int(surface_x) * 1; //scale
|
||||
int y = wl_fixed_to_int(surface_y) * 1; //scale
|
||||
int x = wl_fixed_to_int(surface_x) * term->scale;
|
||||
int y = wl_fixed_to_int(surface_y) * term->scale;
|
||||
|
||||
term->mouse.col = x / term->cell_width;
|
||||
term->mouse.row = y / term->cell_height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue