Fix bug 404506, caused by prematurely releasing a DC. By Hiroyuki Yamamoto

2007-02-05  Dom Lachowicz <domlachowicz@gmail.com>

        * modules/engines/ms-windows/msw_style.c: Fix bug 404506, caused
        by prematurely releasing a DC. By Hiroyuki Yamamoto
        * modules/engines/ms-windows/msw_style.c: Fix bug 403470 - leaking
        pixbufs when drawing rotated tabs. By Daniel Atallah


svn path=/trunk/; revision=17263
This commit is contained in:
Dom Lachowicz 2007-02-05 14:30:06 +00:00 committed by Dom Lachowicz
parent 17fed85c24
commit 47b8d98aba
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2007-02-05 Dom Lachowicz <domlachowicz@gmail.com>
* modules/engines/ms-windows/msw_style.c: Fix bug 404506, caused
by prematurely releasing a DC. By Hiroyuki Yamamoto
* modules/engines/ms-windows/msw_style.c: Fix bug 403470 - leaking
pixbufs when drawing rotated tabs. By Daniel Atallah
2007-02-05 Michael Natterer <mitch@imendio.com>
* gtk/gtksettings.c: add new boolean settings gtk-enable-accels

View File

@ -466,12 +466,15 @@ sys_font_to_pango_font (XpThemeClass klazz, XpThemeFont type, char *buf,
{
pt_size = -MulDiv (lf.lfHeight, 72,
GetDeviceCaps (hDC, LOGPIXELSY));
ReleaseDC (hwnd, hDC);
}
else
pt_size = 10;
font = get_family_name (&lf, hDC);
if (hDC)
ReleaseDC (hwnd, hDC);
if(!(font && *font))
return NULL;
@ -1988,8 +1991,6 @@ draw_box (GtkStyle * style,
{
RECT rect;
HDC dc;
gboolean rtl = (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL);
gboolean up = !strcmp (detail, "spinbutton_up");
dc = get_window_dc( style, window, state_type,
x, y, width, height, &rect );
@ -2409,7 +2410,6 @@ draw_extension (GtkStyle * style,
int tab_part = XP_THEME_ELEMENT_TAB_ITEM;
int real_gap_side = gtk_notebook_get_tab_pos (notebook);
int border_width = gtk_container_get_border_width (GTK_CONTAINER (notebook));
gboolean last_tab;
/* why this differs from the above gap_side, i have no idea... */
if (real_gap_side == GTK_POS_LEFT)
@ -2529,6 +2529,8 @@ draw_extension (GtkStyle * style,
gdk_draw_pixbuf (window, NULL, pixbuf, 0, 0, x2, y2, w2, h2, GDK_RGB_DITHER_NONE, 0, 0);
g_object_unref (G_OBJECT (pixbuf));
if (real_gap_side == GTK_POS_LEFT || real_gap_side == GTK_POS_RIGHT)
{
g_object_unref (pixmap);