[gtk+/gtk-2-24-quartz] win32: Fix ms-windows theme to not create native subwindows



commit cd73f0103392ac9700499fe70ceb2b961051d4b8
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Oct 28 11:06:59 2011 +0200

    win32: Fix ms-windows theme to not create native subwindows
    
    GDK_WINDOW_HWND() calls from outside gdk calls ensure_native_window,
    but we really want the HWND of the impl window, so call
    the new gdk_win32_window_get_impl_hwnd() instead.

 modules/engines/ms-windows/xp_theme.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/modules/engines/ms-windows/xp_theme.c b/modules/engines/ms-windows/xp_theme.c
index 48fb594..3d07891 100755
--- a/modules/engines/ms-windows/xp_theme.c
+++ b/modules/engines/ms-windows/xp_theme.c
@@ -943,6 +943,7 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
   HDC dc;
   XpDCInfo dc_info;
   int part_state;
+  HWND hwnd;
 
   if (!xp_theme_is_drawable (element))
     return FALSE;
@@ -952,8 +953,9 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
     return FALSE;
 
   /* FIXME: Recheck its function */
-  if (GDK_IS_WINDOW (win) && gdk_win32_window_is_win32 (win))
-  enable_theme_dialog_texture_func (GDK_WINDOW_HWND (win), ETDT_ENABLETAB);
+  hwnd = gdk_win32_window_get_impl_hwnd (win);
+  if (hwnd != NULL)
+    enable_theme_dialog_texture_func (hwnd, ETDT_ENABLETAB);
 
   dc = get_window_dc (style, win, state_type, &dc_info,
 		      x, y, width, height,
@@ -979,7 +981,7 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
 
   /* Support transparency */
   if (is_theme_partially_transparent_func (theme, element_part_map[element], part_state))
-    draw_theme_parent_background_func (GDK_WINDOW_HWND (win), dc, pClip);
+    draw_theme_parent_background_func (hwnd, dc, pClip);
 
   draw_theme_background_func (theme, dc, element_part_map[element],
 			      part_state, &rect, pClip);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]