mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
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:
parent
5551fc6754
commit
72ea12fec0
23
ChangeLog
23
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.
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user