diff options
author | Tor Lillqvist <tml@iki.fi> | 2000-07-04 06:12:54 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2000-07-04 06:12:54 +0000 |
commit | a1260f864dc85013eb2a66563ffa0369921b5fe4 (patch) | |
tree | 778455fc4d3d59d6d00cc0d892aa587f7049bfb0 /gdk/win32/gdkcursor-win32.c | |
parent | ceac1c16fd5f74a7914b85f85a691bb68e1a756f (diff) | |
download | gtk+-a1260f864dc85013eb2a66563ffa0369921b5fe4.tar.gz |
Handle also WM_SYSCHAR, and other changes to get handling of Alt+nnn or
2000-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle also
WM_SYSCHAR, and other changes to get handling of Alt+nnn or
Alt+0nnn on the numpad (used to enter characters by numeric code
from current DOS or ANSI codepage) working correctly, as in other
Windows apps.
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Use
same argument validity tests as in X11 version.
(_gdk_cursor_destroy): Use DestroyCursor, not DestroyIcon.
* gdk/win32/gdkwin32.h: Add also WM_MOUSEWHEEL and CopyCursor
definitions in case missing from headers.
* gdk/win32/gdkwindow-win32.c (gdk_win32_window_destroy): ALso
destroy the window-specific cursor.
(RegisterGdkClass): Use the global gdk_ProgInstance instead of
calling GetModuleHandle(NULL).
(gdk_window_set_cursor): Reworked to always copy the passed cursor
with CopyCursor before setting it. It is OK for the caller to
destroy the GdkCursor (and thus also the Windows cursor) after
calling this function. Also, destroy any previous cursor for this
window.
2000-05-29 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents-win32.c (gdk_WindowProc): The local "event"
variable should be of type GdkEventPrivate.
Diffstat (limited to 'gdk/win32/gdkcursor-win32.c')
-rw-r--r-- | gdk/win32/gdkcursor-win32.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 423b83f531..8ef0c58cfe 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -156,8 +156,10 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, guchar residue; gint ix, iy; - g_return_val_if_fail (source != NULL, NULL); - g_return_val_if_fail (mask != NULL, NULL); + g_return_val_if_fail (GDK_IS_PIXMAP (source), NULL); + g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL); + g_return_val_if_fail (fg != NULL, NULL); + g_return_val_if_fail (bg != NULL, NULL); source_private = (GdkDrawablePrivate *) source; mask_private = (GdkDrawablePrivate *) mask; @@ -269,8 +271,8 @@ _gdk_cursor_destroy (GdkCursor *cursor) (cursor->type == GDK_CURSOR_IS_PIXMAP) ? private->xcursor : 0)); if (cursor->type == GDK_CURSOR_IS_PIXMAP) - if (!DestroyIcon (private->xcursor)) - WIN32_API_FAILED ("DestroyIcon"); + if (!DestroyCursor (private->xcursor)) + WIN32_API_FAILED ("DestroyCursor"); g_free (private); } |