From 437a359f1b7f9da0638ffa16055cc18b2bdd4a70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 16 Nov 2022 11:42:22 +0400 Subject: [PATCH] gdk/win32: fix cursor hotspot MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This seems to be a regression from commit c06b1cc103b8 "Win32: Re-work cursor handling". Signed-off-by: Marc-André Lureau --- gdk/win32/gdkcursor-win32.c | 12 +----------- gdk/win32/gdkprivate-win32.h | 3 --- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index c5d703cb3a..dc707d5674 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -911,7 +911,7 @@ gdk_win32hcursor_create_for_texture (GdkWin32Display *display, pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height); - icon = pixbuf_to_hicon (pixbuf, TRUE, 0, 0); + icon = pixbuf_to_hicon (pixbuf, FALSE, x, y); g_object_unref (pixbuf); @@ -1472,16 +1472,6 @@ _gdk_win32_texture_to_hicon (GdkTexture *texture) return icon; } -HICON -_gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf, - int x_hotspot, - int y_hotspot) -{ - return pixbuf_to_hicon (pixbuf, FALSE, x_hotspot, y_hotspot); -} - - - /** * gdk_win32_display_get_win32hcursor: * @display: (type GdkWin32Display): a `GdkDisplay` diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index f900a2e6f8..230a537a0b 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -330,9 +330,6 @@ void _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind); * Windows XP, thresholds alpha otherwise. */ HICON _gdk_win32_texture_to_hicon (GdkTexture *texture); -HICON _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf, - int x_hotspot, - int y_hotspot); void _gdk_win32_display_init_cursors (GdkWin32Display *display); void _gdk_win32_display_finalize_cursors (GdkWin32Display *display); -- 2.30.2