From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Let the USB tablet reach the far bottom and right pixels
Date: Wed, 27 Feb 2008 16:41:39 +0000 [thread overview]
Message-ID: <20080227164139.GG5839@implementation.uk.xensource.com> (raw)
In-Reply-To: <alpine.LSU.1.00.0802271533230.22527@racer.site>
Johannes Schindelin, le Wed 27 Feb 2008 15:35:01 +0000, a écrit :
> > 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.
No, because then you would not reach 0x7FFF:
(1023 * 0x8000) / 1024 -> 0x7fe0
And then the guest does not reach 1023 (tested on windows).
Samuel
next prev parent reply other threads:[~2008-02-27 16:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 14:45 [Qemu-devel] [PATCH] Let the USB tablet reach the far bottom and right pixels Samuel Thibault
2008-02-27 15:35 ` Johannes Schindelin
2008-02-27 16:41 ` Samuel Thibault [this message]
2008-02-27 16:56 ` Johannes Schindelin
2008-03-05 10:46 ` [Qemu-devel] " Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080227164139.GG5839@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).