From 4ea98cbe1a2cbb6fc378cdef139cf5431a746817 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 15 Feb 2002 23:23:56 +0000 Subject: [PATCH] No need to create new images to scan with gdk_image_get(). Use the 2002-02-16 Tor Lillqvist * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No need to create new images to scan with gdk_image_get(). Use the GdkImage view of the GdkPixmap always present nowadays with the unified GdkPixmap-GdkImage implementation. * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej Simoncic for providing the nice multi-resolution .ico file. --- ChangeLog | 12 ++++++++++++ ChangeLog.pre-2-0 | 12 ++++++++++++ ChangeLog.pre-2-10 | 12 ++++++++++++ ChangeLog.pre-2-2 | 12 ++++++++++++ ChangeLog.pre-2-4 | 12 ++++++++++++ ChangeLog.pre-2-6 | 12 ++++++++++++ ChangeLog.pre-2-8 | 12 ++++++++++++ gdk/win32/gdkcursor-win32.c | 16 ++++------------ 8 files changed, 88 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4bf8e2e89c..5899f78b15 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +2002-02-16 Tor Lillqvist + + * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): No + need to create new images to scan with gdk_image_get(). Use the + GdkImage view of the GdkPixmap always present nowadays with the + unified GdkPixmap-GdkImage implementation. + + * gdk/win32/rc/Makefile.am (gdk-win32res.lo): Depend on gtk.ico. + + * gdk/win32/rc/gtk.ico: Use the real GTK logo. Thanks to Jernej + Simoncic for providing the multi-resolution .ico file. + 2002-02-15 Tor Lillqvist * gdk/win32/gdkdrawable-win32.c (gdk_win32_drawable_description): diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 9e97b0fc51..dae50484cd 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -155,16 +155,11 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, residue = (1 << ((8-(width%8))%8)) - 1; - source_image = gdk_image_get (source, 0, 0, width, height); - mask_image = gdk_image_get (mask, 0, 0, width, height); + source_image = GDK_DRAWABLE_WIN32DATA (source)->image; + mask_image = GDK_DRAWABLE_WIN32DATA (mask)->image; - if (source_image->depth != 1 || mask_image->depth != 1) - { - gdk_image_unref (source_image); - gdk_image_unref (mask_image); - g_return_val_if_fail (source_image->depth == 1 && mask_image->depth == 1, - NULL); - } + g_return_val_if_fail (source_image->depth == 1 && mask_image->depth == 1, + NULL); #ifdef G_ENABLE_DEBUG if (gdk_debug_flags & GDK_DEBUG_CURSOR) @@ -277,9 +272,6 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, g_free (XORmask); g_free (ANDmask); - gdk_image_unref (source_image); - gdk_image_unref (mask_image); - private = g_new (GdkCursorPrivate, 1); private->xcursor = xcursor; cursor = (GdkCursor*) private;