On Wed, Nov 20, 2013 at 3:17 PM, Dave Airlie <airl...@gmail.com> wrote: >>> Have a look the virtio-gpu branch in my repo (don't look at the >>> history, its ugly, just the final state), you'll see code in sdl2.c to >>> do input translation from window coordinates to the overall screen >>> space. So we need at least the x,y offset in the ui code, and I think >>> we need to communicate that via the console. >>> >> >> One of the patches I will be submitting as part of this includes >> bi-directional calls to set the orientation. A HwOp, and a >> DisplayChangeListenerOp. This allows you to move the display orientation >> around in the guest (if your driver and backend support it), or to move the >> orientation around by dragging windows... Either way you have the data you >> need to get absolute coordinates right, even if you are scaling the guest >> display in your windows. Whether the orientation offsets end up stored in >> the QemuConsole or not becomes an implementation detail if you get >> notifications. > > Okay I just hacked up something similar with the bidirectional ops, > and ran into the fact that DisplayChangeListeners are stored per > DisplayState, so when my GPU drivers tries to callback for console > number 1, the dcls for both consoles gets called, this doesn't seem so > optimal.
Actually ignore that, I didn't cut-n-paste properly :-) Dave.