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