Hi,

On Wed, 27 Feb 2008, Samuel Thibault wrote:

> Index: cocoa.m
> ===================================================================
> RCS file: /sources/qemu/qemu/cocoa.m,v
> retrieving revision 1.15
> diff -u -p -r1.15 cocoa.m
> --- cocoa.m   22 Jan 2008 23:25:15 -0000      1.15
> +++ cocoa.m   27 Feb 2008 14:42:02 -0000
> @@ -40,7 +40,7 @@
>  #define cgrect(nsrect) (*(CGRect *)&(nsrect))
>  #define COCOA_MOUSE_EVENT \
>          if (isTabletEnabled) { \
> -            kbd_mouse_event((int)(p.x * 0x7FFF / screen.width), 
> (int)((screen.height - p.y) * 0x7FFF / screen.height), 0, buttons); \
> +            kbd_mouse_event((int)(p.x * 0x7FFF / (screen.width - 1)), 
> (int)((screen.height - p.y) * 0x7FFF / (screen.height - 1)), 0, buttons); \

Would it not be better to multiply with 0x8000 / screen.width?  This 
seems "more correct" to me.

Ciao,
Dscho


Reply via email to