qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: John Baboval <baboval@spineless.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] console muti-head some more design input
Date: Fri, 22 Nov 2013 09:36:20 +0100	[thread overview]
Message-ID: <1385109380.3681.29.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <528CD9FD.2060308@spineless.org>

  Hi,

> > With absolute pointer events the whole thing becomes a bit more tricky
> > as we have to map input from multiple displays (QemuConsoles) to a
> > single absolute pointing device (usb tablet).  This is what Dave wants
> > the screen layout for.  I still think the input layer is the place to do
> > this transformation.
> 
> We solve this problem in our UI now. It's not enough to know the 
> offsets. You also need to know all the resolutions - the display window, 
> the guest, and the device coordinate system of the virtual pointing 
> device (we use a PV event ring instead of a USB tablet).
> 
> If your UI can scale the guest output, that means you need to also store 
> the UI's window geometry in the QemuConsole to get the math right.

qemu input layer uses a 0 -> 0x7fff range for absolute coordinates.  So
your ui code has to transform the pointer position to that, considering
window scaling if needed, then pass it to the input code.  Inout code
passes it on to the input device, which again will scale it to the
dimensions of the usb-tablet / pv device / whatever.

For multihead support we need the additional step to transform (display,
phys-x, phys-y) to (virtual-x, virtual-y) using the screen layout.  IMO
the input layer should to that.  Quite some changes are need to handle
that, but the input layer needs some love anyway.

cheers,
  Gerd

  reply	other threads:[~2013-11-22  8:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  6:24 [Qemu-devel] console muti-head some more design input Dave Airlie
2013-11-19  8:11 ` Gerd Hoffmann
2013-11-20  2:59   ` Dave Airlie
2013-11-20  4:06     ` John Baboval
2013-11-20  5:17       ` Dave Airlie
2013-11-20  5:18         ` Dave Airlie
2013-11-20  8:12     ` Gerd Hoffmann
2013-11-20 14:32       ` John Baboval
2013-11-20 15:14         ` Gerd Hoffmann
2013-11-20 15:49           ` John Baboval
2013-11-22  8:36             ` Gerd Hoffmann [this message]
2013-11-21  0:45           ` Dave Airlie
2013-11-22  8:41             ` Gerd Hoffmann
2013-11-27  4:29               ` Dave Airlie
2013-11-27  7:11                 ` Gerd Hoffmann
2013-11-27 14:23                 ` John Baboval

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=1385109380.3681.29.camel@nilsson.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=baboval@spineless.org \
    --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).