From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKjZ-0001eD-ST for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:15:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIKjW-00005x-NS for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:15:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKjW-0008Vh-Fw for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:15:18 -0400 Message-ID: <5149D27E.2010505@redhat.com> Date: Wed, 20 Mar 2013 16:15:10 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1363772625-9182-1-git-send-email-kraxel@redhat.com> <1363772625-9182-22-git-send-email-kraxel@redhat.com> <87fvzq6xcz.fsf@codemonkey.ws> In-Reply-To: <87fvzq6xcz.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 21/23] gtk: custom cursor support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org >> +static void gd_mouse_set(DisplayChangeListener *dcl, >> + int x, int y, int visible) >> +{ >> + /* should warp pointer to x, y here */ > > This is just a matter of doing: > > gdk_window_get_root_coords(window, x, y, &x_root, &y_root); > gdk_display_warp_pointer(display, screen, x_root, y_root); Thanks. >> + cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), > > You should get the display from the drawing_area widget. Yea, couldn't find the function which does this though. >> + pixbuf, c->hot_x, c->hot_y); >> + gdk_window_set_cursor(s->drawing_area->window, cursor); >> + g_object_unref(pixbuf); > > You should also dereference the cursor here. Will fix. cheers, Gerd