Define more message types missing from mingw headers.

2000-05-13  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.

* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).

* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.

* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.

* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.

* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
This commit is contained in:
Tor Lillqvist 2000-05-12 22:29:31 +00:00 committed by Tor Lillqvist
parent 438e6357b7
commit cab7ca49d5
12 changed files with 520 additions and 15 deletions

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -1,3 +1,32 @@
2000-05-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwin32.h: Define more message types missing from
mingw headers.
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On WM_DESTROY
call gdk_window_destroy_notify(). It was never called. This
probably meant that the GdkWindow was never freed. Thanks Owen for
noticing (!).
* gdk/win32/gdkwindow-win32.c (gdk_window_internal_destroy): Mark
window as destroyed before calling DestroyWindow(). DestroyWindow()
causes a call to the window procedure (gdk_WindowProc), which
calls gdk_event_translate(), which calls
gdk_window_destroy_notify(), which gets confused unless the window
is set as destroyed.
* gdk/win32/gdkcolor-win32.c (gdk_win32_color_to_string): Rename
this function to indicate it's win32 only. Put inside #ifdef
G_ENABLE_DEBUG.
* gdk/win32/gdkevents-win32.c (gdk_win32_message_name): New
debugging function. (gdk_event_translate:) Add a default branch
that uses the above function to print debug messages with all
Windows messages symbolically.
* gdk/win32/gdkprivate-win32.h: Declare it, and
gdk_win32_color_to_string, but only if G_ENABLE_DEBUG.
Fri May 12 20:07:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkcolorseldialog.c: don't include gtk/gtkintl.h in a

View File

@ -2213,8 +2213,10 @@ gdk_colormap_cmp (Colormap *a,
return (*a == *b);
}
#ifdef G_ENABLE_DEBUG
gchar *
gdk_color_to_string (const GdkColor *color)
gdk_win32_color_to_string (const GdkColor *color)
{
static char buf[100];
@ -2223,3 +2225,5 @@ gdk_color_to_string (const GdkColor *color)
return buf;
}
#endif

View File

@ -4222,7 +4222,11 @@ gdk_event_translate (GdkEvent *event,
if (k_grab_window == window)
gdk_keyboard_ungrab (xevent->time);
return_val = !GDK_DRAWABLE_DESTROYED (window);
return_val = window != NULL && !GDK_DRAWABLE_DESTROYED (window);
if (window != NULL)
gdk_window_destroy_notify (window);
break;
#ifdef HAVE_WINTAB
@ -4253,6 +4257,12 @@ gdk_event_translate (GdkEvent *event,
return_val = gdk_input_vtable.other_event(event, xevent);
break;
#endif
default:
GDK_NOTE (EVENTS, g_print ("%s: %#x %#x %#x\n",
gdk_win32_msgname (xevent->message),
xevent->hwnd,
xevent->wParam, xevent->lParam));
}
bypass_switch:
@ -4399,3 +4409,241 @@ gdk_flush (void)
{
GdiFlush ();
}
#ifdef G_ENABLE_DEBUG
gchar *
gdk_win32_message_name (UINT msg)
{
static gchar bfr[100];
switch (msg)
{
#define CASE(x) case x: return #x
CASE (WM_NULL);
CASE (WM_CREATE);
CASE (WM_DESTROY);
CASE (WM_MOVE);
CASE (WM_SIZE);
CASE (WM_ACTIVATE);
CASE (WM_SETFOCUS);
CASE (WM_KILLFOCUS);
CASE (WM_ENABLE);
CASE (WM_SETREDRAW);
CASE (WM_SETTEXT);
CASE (WM_GETTEXT);
CASE (WM_GETTEXTLENGTH);
CASE (WM_PAINT);
CASE (WM_CLOSE);
CASE (WM_QUERYENDSESSION);
CASE (WM_QUERYOPEN);
CASE (WM_ENDSESSION);
CASE (WM_QUIT);
CASE (WM_ERASEBKGND);
CASE (WM_SYSCOLORCHANGE);
CASE (WM_SHOWWINDOW);
CASE (WM_WININICHANGE);
CASE (WM_DEVMODECHANGE);
CASE (WM_ACTIVATEAPP);
CASE (WM_FONTCHANGE);
CASE (WM_TIMECHANGE);
CASE (WM_CANCELMODE);
CASE (WM_SETCURSOR);
CASE (WM_MOUSEACTIVATE);
CASE (WM_CHILDACTIVATE);
CASE (WM_QUEUESYNC);
CASE (WM_GETMINMAXINFO);
CASE (WM_PAINTICON);
CASE (WM_ICONERASEBKGND);
CASE (WM_NEXTDLGCTL);
CASE (WM_SPOOLERSTATUS);
CASE (WM_DRAWITEM);
CASE (WM_MEASUREITEM);
CASE (WM_DELETEITEM);
CASE (WM_VKEYTOITEM);
CASE (WM_CHARTOITEM);
CASE (WM_SETFONT);
CASE (WM_GETFONT);
CASE (WM_SETHOTKEY);
CASE (WM_GETHOTKEY);
CASE (WM_QUERYDRAGICON);
CASE (WM_COMPAREITEM);
CASE (WM_GETOBJECT);
CASE (WM_COMPACTING);
CASE (WM_WINDOWPOSCHANGING);
CASE (WM_WINDOWPOSCHANGED);
CASE (WM_POWER);
CASE (WM_COPYDATA);
CASE (WM_CANCELJOURNAL);
CASE (WM_NOTIFY);
CASE (WM_INPUTLANGCHANGEREQUEST);
CASE (WM_INPUTLANGCHANGE);
CASE (WM_TCARD);
CASE (WM_HELP);
CASE (WM_USERCHANGED);
CASE (WM_NOTIFYFORMAT);
CASE (WM_CONTEXTMENU);
CASE (WM_STYLECHANGING);
CASE (WM_STYLECHANGED);
CASE (WM_DISPLAYCHANGE);
CASE (WM_GETICON);
CASE (WM_SETICON);
CASE (WM_NCCREATE);
CASE (WM_NCDESTROY);
CASE (WM_NCCALCSIZE);
CASE (WM_NCHITTEST);
CASE (WM_NCPAINT);
CASE (WM_NCACTIVATE);
CASE (WM_GETDLGCODE);
CASE (WM_SYNCPAINT);
CASE (WM_NCMOUSEMOVE);
CASE (WM_NCLBUTTONDOWN);
CASE (WM_NCLBUTTONUP);
CASE (WM_NCLBUTTONDBLCLK);
CASE (WM_NCRBUTTONDOWN);
CASE (WM_NCRBUTTONUP);
CASE (WM_NCRBUTTONDBLCLK);
CASE (WM_NCMBUTTONDOWN);
CASE (WM_NCMBUTTONUP);
CASE (WM_NCMBUTTONDBLCLK);
CASE (WM_NCXBUTTONDOWN);
CASE (WM_NCXBUTTONUP);
CASE (WM_NCXBUTTONDBLCLK);
CASE (WM_KEYDOWN);
CASE (WM_KEYUP);
CASE (WM_CHAR);
CASE (WM_DEADCHAR);
CASE (WM_SYSKEYDOWN);
CASE (WM_SYSKEYUP);
CASE (WM_SYSCHAR);
CASE (WM_SYSDEADCHAR);
CASE (WM_KEYLAST);
CASE (WM_IME_STARTCOMPOSITION);
CASE (WM_IME_ENDCOMPOSITION);
CASE (WM_IME_COMPOSITION);
CASE (WM_INITDIALOG);
CASE (WM_COMMAND);
CASE (WM_SYSCOMMAND);
CASE (WM_TIMER);
CASE (WM_HSCROLL);
CASE (WM_VSCROLL);
CASE (WM_INITMENU);
CASE (WM_INITMENUPOPUP);
CASE (WM_MENUSELECT);
CASE (WM_MENUCHAR);
CASE (WM_ENTERIDLE);
CASE (WM_MENURBUTTONUP);
CASE (WM_MENUDRAG);
CASE (WM_MENUGETOBJECT);
CASE (WM_UNINITMENUPOPUP);
CASE (WM_MENUCOMMAND);
CASE (WM_CHANGEUISTATE);
CASE (WM_UPDATEUISTATE);
CASE (WM_QUERYUISTATE);
CASE (WM_CTLCOLORMSGBOX);
CASE (WM_CTLCOLOREDIT);
CASE (WM_CTLCOLORLISTBOX);
CASE (WM_CTLCOLORBTN);
CASE (WM_CTLCOLORDLG);
CASE (WM_CTLCOLORSCROLLBAR);
CASE (WM_CTLCOLORSTATIC);
CASE (WM_MOUSEMOVE);
CASE (WM_LBUTTONDOWN);
CASE (WM_LBUTTONUP);
CASE (WM_LBUTTONDBLCLK);
CASE (WM_RBUTTONDOWN);
CASE (WM_RBUTTONUP);
CASE (WM_RBUTTONDBLCLK);
CASE (WM_MBUTTONDOWN);
CASE (WM_MBUTTONUP);
CASE (WM_MBUTTONDBLCLK);
CASE (WM_MOUSEWHEEL);
CASE (WM_XBUTTONDOWN);
CASE (WM_XBUTTONUP);
CASE (WM_XBUTTONDBLCLK);
CASE (WM_PARENTNOTIFY);
CASE (WM_ENTERMENULOOP);
CASE (WM_EXITMENULOOP);
CASE (WM_NEXTMENU);
CASE (WM_SIZING);
CASE (WM_CAPTURECHANGED);
CASE (WM_MOVING);
CASE (WM_POWERBROADCAST);
CASE (WM_DEVICECHANGE);
CASE (WM_MDICREATE);
CASE (WM_MDIDESTROY);
CASE (WM_MDIACTIVATE);
CASE (WM_MDIRESTORE);
CASE (WM_MDINEXT);
CASE (WM_MDIMAXIMIZE);
CASE (WM_MDITILE);
CASE (WM_MDICASCADE);
CASE (WM_MDIICONARRANGE);
CASE (WM_MDIGETACTIVE);
CASE (WM_MDISETMENU);
CASE (WM_ENTERSIZEMOVE);
CASE (WM_EXITSIZEMOVE);
CASE (WM_DROPFILES);
CASE (WM_MDIREFRESHMENU);
CASE (WM_IME_SETCONTEXT);
CASE (WM_IME_NOTIFY);
CASE (WM_IME_CONTROL);
CASE (WM_IME_COMPOSITIONFULL);
CASE (WM_IME_SELECT);
CASE (WM_IME_CHAR);
CASE (WM_IME_REQUEST);
CASE (WM_IME_KEYDOWN);
CASE (WM_IME_KEYUP);
CASE (WM_MOUSEHOVER);
CASE (WM_MOUSELEAVE);
CASE (WM_NCMOUSEHOVER);
CASE (WM_NCMOUSELEAVE);
CASE (WM_CUT);
CASE (WM_COPY);
CASE (WM_PASTE);
CASE (WM_CLEAR);
CASE (WM_UNDO);
CASE (WM_RENDERFORMAT);
CASE (WM_RENDERALLFORMATS);
CASE (WM_DESTROYCLIPBOARD);
CASE (WM_DRAWCLIPBOARD);
CASE (WM_PAINTCLIPBOARD);
CASE (WM_VSCROLLCLIPBOARD);
CASE (WM_SIZECLIPBOARD);
CASE (WM_ASKCBFORMATNAME);
CASE (WM_CHANGECBCHAIN);
CASE (WM_HSCROLLCLIPBOARD);
CASE (WM_QUERYNEWPALETTE);
CASE (WM_PALETTEISCHANGING);
CASE (WM_PALETTECHANGED);
CASE (WM_HOTKEY);
CASE (WM_PRINT);
CASE (WM_PRINTCLIENT);
CASE (WM_APPCOMMAND);
CASE (WM_HANDHELDFIRST);
CASE (WM_HANDHELDLAST);
CASE (WM_AFXFIRST);
CASE (WM_AFXLAST);
CASE (WM_PENWINFIRST);
CASE (WM_PENWINLAST);
CASE (WM_APP);
#undef CASE
default:
if (msg >= WM_HANDHELDFIRST && msg <= WM_HANDHELDLAST)
sprintf (bfr, "WM_HANDHELDFIRST+%d", msg - WM_HANDHELDFIRST);
else if (msg >= WM_AFXFIRST && msg <= WM_AFXLAST)
sprintf (bfr, "WM_AFXFIRST+%d", msg - WM_AFXFIRST);
else if (msg >= WM_PENWINFIRST && msg <= WM_PENWINLAST)
sprintf (bfr, "WM_PENWINFIRST+%d", msg - WM_PENWINFIRST);
else if (msg >= WM_USER && msg <= 0x7FFF)
sprintf (bfr, "WM_USER+%d", msg - WM_USER);
else if (msg >= 0xC000 && msg <= 0xFFFF)
sprintf (bfr, "reg-%#x", msg);
else
sprintf (bfr, "unk-%#x", msg);
return bfr;
}
g_assert_not_reached ();
}
#endif /* G_ENABLE_DEBUG */

View File

@ -73,7 +73,11 @@ void gdk_wchar_text_handle (GdkFont *font,
void *),
void *arg);
gchar *gdk_color_to_string (const GdkColor *);
#ifdef G_ENABLE_DEBUG
gchar *gdk_win32_color_to_string (const GdkColor *);
gchar *gdk_win32_message_name (UINT msg);
#endif
gchar *gdk_win32_last_error_string (void);
void gdk_win32_api_failed (const gchar *where,
gint line,

View File

@ -63,44 +63,84 @@
#endif
/* Missing messages */
#ifndef WM_GETOBJECT
#define WM_GETOBJECT 0x3D
#endif
#ifndef WM_NCXBUTTONDOWN
#define WM_NCXBUTTONDOWN 0xAB
#endif
#ifndef WM_NCXBUTTONUP
#define WM_NCXBUTTONUP 0xAC
#endif
#ifndef WM_NCXBUTTONDBLCLK
#define WM_NCXBUTTONDBLCLK 0xAD
#endif
#ifndef WM_MENURBUTTONUP
#define WM_MENURBUTTONUP 0x122
#endif
#ifndef WM_MENUDRAG
#define WM_MENUDRAG 0x123
#endif
#ifndef WM_MENUGETOBJECT
#define WM_MENUGETOBJECT 0x124
#endif
#ifndef WM_UNINITMENUPOPUP
#define WM_UNINITMENUPOPUP 0x125
#endif
#ifndef WM_MENUCOMMAND
#define WM_MENUCOMMAND 0x126
#endif
#ifndef WM_CHANGEUISTATE
#define WM_CHANGEUISTATE 0x127
#endif
#ifndef WM_UPDATEUISTATE
#define WM_UPDATEUISTATE 0x128
#endif
#ifndef WM_QUERYUISTATE
#define WM_QUERYUISTATE 0x129
#endif
#ifndef WM_XBUTTONDOWN
#define WM_XBUTTONDOWN 0x20B
#endif
#ifndef WM_XBUTTONUP
#define WM_XBUTTONUP 0x20C
#endif
#ifndef WM_XBUTTONDBLCLK
#define WM_XBUTTONDBLCLK 0x20D
#endif
#ifndef WM_IME_REQUEST
#define WM_IME_REQUEST 0x288
#endif
#ifndef WM_MOUSEHOVER
#define WM_MOUSEHOVER 0x2A1
#endif
#ifndef WM_MOUSELEAVE
#define WM_MOUSELEAVE 0x2A3
#endif
#ifndef WM_NCMOUSEHOVER
#define WM_NCMOUSEHOVER 0x2A0
#endif
#ifndef WM_NCMOUSELEAVE
#define WM_NCMOUSELEAVE 0x2A2
#endif
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x319
#endif
#ifndef WM_HANDHELDFIRST
#define WM_HANDHELDFIRST 0x358
#endif
#ifndef WM_HANDHELDLAST
#define WM_HANDHELDLAST 0x35F
#endif
#ifndef WM_AFXFIRST
#define WM_AFXFIRST 0x360
#endif
#ifndef WM_AFXLAST
#define WM_AFXLAST 0x37F
#endif
#include <gdk/gdkprivate.h>
#include "gdkwin32.h"
/* Define corresponding Windows types for some X11 types, just for laziness. */
typedef PALETTEENTRY XColor;

View File

@ -624,14 +624,20 @@ gdk_window_internal_destroy (GdkWindow *window,
PostMessage (GDK_DRAWABLE_XID (window), WM_QUIT, 0, 0);
}
}
else if (xdestroy)
DestroyWindow (GDK_DRAWABLE_XID (window));
else
{
private->drawable.destroyed = TRUE;
if (xdestroy)
{
/* Calls gdk_WindowProc */
DestroyWindow (GDK_DRAWABLE_XID (window));
}
}
if (private->drawable.colormap)
gdk_colormap_unref (private->drawable.colormap);
private->mapped = FALSE;
private->drawable.destroyed = TRUE;
}
break;
@ -1398,7 +1404,7 @@ gdk_window_set_background (GdkWindow *window,
{
GDK_NOTE (MISC, g_print ("gdk_window_set_background: %#x %s\n",
GDK_DRAWABLE_XID (window),
gdk_color_to_string (color)));
gdk_win32_color_to_string (color)));
if (GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PIXMAP)
{