]> Pileus Git - ~andy/gtk/commitdiff
As there is only one GdkDisplay in the Win32 backend, check that
authorTor Lillqvist <tml@novell.com>
Thu, 3 Nov 2005 13:44:37 +0000 (13:44 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 3 Nov 2005 13:44:37 +0000 (13:44 +0000)
2005-11-03  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
the Win32 backend, check that GdkDisplay* parameters are equal to
_gdk_display instead of using the unnecessarily general
GDK_IS_DISPLAY().

ChangeLog
ChangeLog.pre-2-10
gdk/win32/gdkcursor-win32.c

index 07a6f7e87aad1cefc874daf021897ab517c313e8..f5fdd19693bc4388e5169139f54bd6336c9ebbb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,19 @@
 2005-11-03  Tor Lillqvist  <tml@novell.com>
 
-       * gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
-       Rename the variables for the color bitmap to have "color" in their
-       name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
-       color bitmap for the mask, too, instead of creating a b&w bitmap
-       with CreateBitmap(). Set up the mask bitmap's contents, ones for
-       those pixels in the color bitmap where the alpha is zero, zero for
-       other pixels. We used to use an unitialized mask bitmap! This
-       meant that icons and cursors created presumably worked more or
-       less by accident. Totally blank icons with zero alpha everywhere
+       * gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
+       the Win32 backend, check that GdkDisplay* parameters are equal to
+       _gdk_display instead of using the unnecessarily general
+       GDK_IS_DISPLAY().
+
+       (pixbuf_to_hbitmaps_alpha_winxp): Rename the variables for the
+       color bitmap to have "color" in their name, for similarity with
+       pixbuf_to_hbitmaps_normal(). Create a color bitmap for the mask,
+       too, instead of creating a b&w bitmap with CreateBitmap(). Set up
+       the mask bitmap's contents, ones for those pixels in the color
+       bitmap where the alpha is zero, zero for other pixels. We used to
+       use an unitialized mask bitmap! This meant that icons and cursors
+       created presumably worked more or less by accident. Totally blank
+       icons with zero alpha everywhere
        (as used by gtktrayicon.c) definitely did not work as expected.
 
        * gtk/Makefile.am: Include gtkstatusicon.c on all platforms.
index 07a6f7e87aad1cefc874daf021897ab517c313e8..f5fdd19693bc4388e5169139f54bd6336c9ebbb9 100644 (file)
@@ -1,14 +1,19 @@
 2005-11-03  Tor Lillqvist  <tml@novell.com>
 
-       * gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
-       Rename the variables for the color bitmap to have "color" in their
-       name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
-       color bitmap for the mask, too, instead of creating a b&w bitmap
-       with CreateBitmap(). Set up the mask bitmap's contents, ones for
-       those pixels in the color bitmap where the alpha is zero, zero for
-       other pixels. We used to use an unitialized mask bitmap! This
-       meant that icons and cursors created presumably worked more or
-       less by accident. Totally blank icons with zero alpha everywhere
+       * gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
+       the Win32 backend, check that GdkDisplay* parameters are equal to
+       _gdk_display instead of using the unnecessarily general
+       GDK_IS_DISPLAY().
+
+       (pixbuf_to_hbitmaps_alpha_winxp): Rename the variables for the
+       color bitmap to have "color" in their name, for similarity with
+       pixbuf_to_hbitmaps_normal(). Create a color bitmap for the mask,
+       too, instead of creating a b&w bitmap with CreateBitmap(). Set up
+       the mask bitmap's contents, ones for those pixels in the color
+       bitmap where the alpha is zero, zero for other pixels. We used to
+       use an unitialized mask bitmap! This meant that icons and cursors
+       created presumably worked more or less by accident. Totally blank
+       icons with zero alpha everywhere
        (as used by gtktrayicon.c) definitely did not work as expected.
 
        * gtk/Makefile.am: Include gtkstatusicon.c on all platforms.
index 110506b74f80f922b02b666168ded81b64415fd9..0cdaf856fd69fc133102ee132ef040dc2e82886e 100644 (file)
@@ -136,7 +136,7 @@ gdk_cursor_new_for_display (GdkDisplay   *display,
 {
   HCURSOR hcursor;
 
-  g_return_val_if_fail (display == gdk_display_get_default (), NULL);
+  g_return_val_if_fail (display == _gdk_display, NULL);
 
   hcursor = _gdk_win32_data_to_wcursor (cursor_type);
 
@@ -365,7 +365,7 @@ gdk_cursor_new_from_name (GdkDisplay  *display,
   HCURSOR hcursor = NULL;
   int i;
 
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
+  g_return_val_if_fail (display == _gdk_display, NULL);
 
   for (i = 0; i < G_N_ELEMENTS(_default_cursors); i++)
     {
@@ -520,7 +520,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
 {
   HCURSOR hcursor;
 
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
+  g_return_val_if_fail (display == _gdk_display, NULL);
   g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
   g_return_val_if_fail (0 <= x && x < gdk_pixbuf_get_width (pixbuf), NULL);
   g_return_val_if_fail (0 <= y && y < gdk_pixbuf_get_height (pixbuf), NULL);
@@ -534,7 +534,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
 gboolean 
 gdk_display_supports_cursor_alpha (GdkDisplay    *display)
 {
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
+  g_return_val_if_fail (display == _gdk_display, FALSE);
 
   return _gdk_win32_pixbuf_to_hicon_supports_alpha ();
 }
@@ -542,7 +542,7 @@ gdk_display_supports_cursor_alpha (GdkDisplay    *display)
 gboolean 
 gdk_display_supports_cursor_color (GdkDisplay    *display)
 {
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
+  g_return_val_if_fail (display == _gdk_display, FALSE);
 
   return TRUE;
 }
@@ -550,7 +550,7 @@ gdk_display_supports_cursor_color (GdkDisplay    *display)
 guint     
 gdk_display_get_default_cursor_size (GdkDisplay    *display)
 {
-  g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
+  g_return_val_if_fail (display == _gdk_display, FALSE);
   
   return MIN (GetSystemMetrics (SM_CXCURSOR), GetSystemMetrics (SM_CYCURSOR));
 }
@@ -560,7 +560,7 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
                                     guint       *width,
                                     guint       *height)
 {
-  g_return_if_fail (GDK_IS_DISPLAY (display));
+  g_return_val_if_fail (display == _gdk_display, FALSE);
   
   if (width)
     *width = GetSystemMetrics (SM_CXCURSOR);