From a1260f864dc85013eb2a66563ffa0369921b5fe4 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 4 Jul 2000 06:12:54 +0000 Subject: Handle also WM_SYSCHAR, and other changes to get handling of Alt+nnn or 2000-07-04 Tor Lillqvist * 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 * gdk/win32/gdkevents-win32.c (gdk_WindowProc): The local "event" variable should be of type GdkEventPrivate. --- gdk/win32/gdkcursor-win32.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdk/win32/gdkcursor-win32.c') 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); } -- cgit v1.2.1