]> git.proxmox.com Git - qemu.git/blobdiff - cocoa.m
Let the USB tablet reach the far bottom and right pixels
[qemu.git] / cocoa.m
diff --git a/cocoa.m b/cocoa.m
index 8d363361639aa24cdfa76e08e83f4ec42117141d..fe139526ab9d10050530f9a0be28697c751c8178 100644 (file)
--- a/cocoa.m
+++ b/cocoa.m
@@ -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); \
         } else if (isMouseGrabed) { \
             kbd_mouse_event((int)[event deltaX], (int)[event deltaY], 0, buttons); \
         } else { \