Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-14 Thread Chen Zhang via Qemu-devel
> On Mar 14, 2019, at 1:35 AM, BALATON Zoltan wrote: > > On Wed, 13 Mar 2019, Chen Zhang wrote: >> I sympathize with your situation, but the things on macOS seems a little >> different. >> >> The QEMU Cocoa UI starts in the `main` thread and detach a `qemu_main` >> thread which runs stuff i

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-13 Thread BALATON Zoltan
On Wed, 13 Mar 2019, Chen Zhang wrote: I sympathize with your situation, but the things on macOS seems a little different. The QEMU Cocoa UI starts in the `main` thread and detach a `qemu_main` thread which runs stuff in vl.c etc. On the contrary, QEMU with gtk and other UIs just scheduled it

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread Chen Zhang via Qemu-devel
Hi, I sympathize with your situation, but the things on macOS seems a little different. The QEMU Cocoa UI starts in the `main` thread and detach a `qemu_main` thread which runs stuff in vl.c etc. On the contrary, QEMU with gtk and other UIs just scheduled its event loop in the qemu_main thread

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread BALATON Zoltan
On Tue, 12 Mar 2019, Chen Zhang via Qemu-devel wrote: Hi, I did try to utilize NSCursor and CGWarpMouseCursorPosition API before this compromise. In cocoa_mouse_set, the position of cursor should to be modified, but the bottom half that called it was not scheduled on main thread. UI operation

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread Chen Zhang via Qemu-devel
Hi, I did try to utilize NSCursor and CGWarpMouseCursorPosition API before this compromise. In cocoa_mouse_set, the position of cursor should to be modified, but the bottom half that called it was not scheduled on main thread. UI operations have to be queued on main thread asynchronously therea

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread Gerd Hoffmann
Hi, > +if (cursorVisible && cursorImage && NSIntersectsRect(rect, > cursorRect)) { > +CGContextDrawImage (viewContextRef, cursorRect, cursorImage); So you are rendering the cursor to the window. Better approach would be to just set the cursor of the host window, like the g

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-11 Thread no-reply
Patchew URL: https://patchew.org/QEMU/be04b88b-9aac-4348-a165-e115cbe54...@me.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: be04b88b-9aac-4348-a165-e115cbe54...@me.com Subject: [Qemu-devel] [PATCH] ui/cocoa

[Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-11 Thread Chen Zhang via Qemu-devel
This patch added cocoa_mouse_set() and cocoa_cursor_define(), supporting virtio-gpu simple rendering on macOS host. Image content, rect and visibility of the cursor buffer were added as ivars in QemuCocoaView class. Corresponding accessors were added. Note that the rect of the cursor was in coord