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.
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.
{
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);
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++)
{
{
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);
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 ();
}
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;
}
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));
}
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);