diff -uprN gtk+-2.20.1/gdk/gdk.symbols gtk+-2.20.1.az/gdk/gdk.symbols
--- gtk+-2.20.1/gdk/gdk.symbols	2010-06-14 16:28:48 +0200
+++ gtk+-2.20.1.az/gdk/gdk.symbols	2010-06-14 16:29:43 +0200
@@ -1149,6 +1149,7 @@ gdk_window_destroy_notify
 #ifdef GDK_WINDOWING_WIN32
 #if IN_HEADER(__GDK_WIN32_H__)
 #if IN_FILE(__GDK_WINDOW_WIN32_C__)
+gdk_win32_window_is_win32
 gdk_win32_begin_direct_draw_libgtk_only
 gdk_win32_end_direct_draw_libgtk_only
 #endif
diff -uprN gtk+-2.20.1/gdk/win32/gdkwin32.h gtk+-2.20.1.az/gdk/win32/gdkwin32.h
--- gtk+-2.20.1/gdk/win32/gdkwin32.h	2010-06-14 16:28:48 +0200
+++ gtk+-2.20.1.az/gdk/win32/gdkwin32.h	2010-06-14 16:31:38 +0200
@@ -75,6 +75,9 @@ G_BEGIN_DECLS
 #endif
 
 
+/* Return true if the GdkWindow is a win32 implemented window */
+gboolean      gdk_win32_window_is_win32 (GdkWindow *window);
+
 /* Return the Gdk* for a particular HANDLE */
 gpointer      gdk_win32_handle_table_lookup (GdkNativeWindow handle);
 
diff -uprN gtk+-2.20.1/gdk/win32/gdkwindow-win32.c gtk+-2.20.1.az/gdk/win32/gdkwindow-win32.c
--- gtk+-2.20.1/gdk/win32/gdkwindow-win32.c	2010-06-14 16:28:48 +0200
+++ gtk+-2.20.1.az/gdk/win32/gdkwindow-win32.c	2010-06-14 16:32:11 +0200
@@ -3546,6 +3546,12 @@ gdk_window_impl_iface_init (GdkWindowImp
   iface->input_window_crossing = _gdk_input_crossing_event;
 }
 
+gboolean
+gdk_win32_window_is_win32 (GdkWindow *window)
+{
+  return GDK_WINDOW_IS_WIN32 (window);
+}
+
 GdkDrawable *
 gdk_win32_begin_direct_draw_libgtk_only (GdkDrawable *drawable,
 					 GdkGC *gc,
diff -uprN gtk+-2.20.1/modules/engines/ms-windows/xp_theme.c gtk+-2.20.1.az/modules/engines/ms-windows/xp_theme.c
--- gtk+-2.20.1/modules/engines/ms-windows/xp_theme.c	2010-06-14 16:28:48 +0200
+++ gtk+-2.20.1.az/modules/engines/ms-windows/xp_theme.c	2010-06-14 16:32:21 +0200
@@ -909,7 +909,8 @@ xp_theme_draw (GdkWindow *win, XpThemeEl
     return FALSE;
 
   /* FIXME: Recheck its function */
-  enable_theme_dialog_texture_func (GDK_WINDOW_HWND (win), ETDT_ENABLETAB);
+  if (GDK_IS_WINDOW (win) && gdk_win32_window_is_win32 (win))
+    enable_theme_dialog_texture_func (GDK_WINDOW_HWND (win), ETDT_ENABLETAB);
 
   dc = get_window_dc (style, win, state_type, &dc_info,
 		      x, y, width, height,
