On Jun 18, 2018, at 7:18 AM, Peter Maydell wrote:
> On 8 June 2018 at 21:01, John Arbuckle <programmingk...@gmail.com> wrote: >> Fix the cocoa front-end to correctly be able to use absolute mode. >> >> Signed-off-by: John Arbuckle <programmingk...@gmail.com> > > This commit message is insufficiently detailed, which makes > it hard to review the patch. When you send patches, please > can you provide commit messages which describe what the > problem is, where the current code gets things wrong and > why the changes fix the issue? It is painful to have to > reverse-engineer your design from your code changes. Sorry I will correct this problem now. This should have been the commit message: When using an usb-tablet device in QEMU, the Cocoa UI uses absolute mode code to handle mouse events. The absolute mode code does not correctly determine where QEMU's window is located. Tests indicate the current code thinks the window is located in the bottom left of the screen. This makes grabbing and ungrabbing happen at the wrong place. This patch fixes this problem by making mouse grabs happen only in the window and mouse ungrabs happen only when the mouse is moved outside the window.