changeset 1688:72ac6eb33d76

Fixed dw_window_set_color() not removing the transparent flag on OS/2. This was preventing background colors from being set on controls that default to having a transparent background color by default.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 30 Apr 2012 16:49:38 +0000
parents 831aa3a679e6
children 3fb7002e4de6
files os2/dw.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Mon Apr 30 16:23:42 2012 +0000
+++ b/os2/dw.c	Mon Apr 30 16:49:38 2012 +0000
@@ -2046,9 +2046,9 @@
               ULONG fcolor = DT_TEXTATTRS, bcolor = DT_TEXTATTRS;
 
               WinQueryWindowText(hWnd, len + 1, (PSZ)tempbuf);
+              WinQueryWindowRect(hWnd, &rclPaint);
 
               hpsPaint = WinBeginPaint(hWnd, 0, 0);
-              WinQueryWindowRect(hWnd, &rclPaint);
               if(WinQueryPresParam(hWnd, PP_BACKGROUNDCOLOR, 0, NULL, sizeof(bcolor), &bcolor, QPF_NOINHERIT) ||
                  WinQueryPresParam(hWnd, PP_BACKGROUNDCOLORINDEX, 0, NULL, sizeof(bcolor), &bcolor, QPF_NOINHERIT))
                   GpiSetBackColor(hpsPaint, bcolor);
@@ -5187,12 +5187,14 @@
       rgb2.fcOptions = 0;
 
       WinSetPresParam(handle, PP_BACKGROUNDCOLOR, sizeof(RGB2), &rgb2);
+      dw_window_set_data(handle, "_dw_transparent", NULL);
    }
    else if(back != DW_CLR_DEFAULT)
    {
       back = _internal_color(back);
 
       WinSetPresParam(handle, PP_BACKGROUNDCOLORINDEX, sizeof(ULONG), &back);
+      dw_window_set_data(handle, "_dw_transparent", NULL);
    }
    /* If this is a box... check if any of the children are transparent */
    _handle_transparent(handle);