Changeset 3821 for trunk/src/user32/dc.cpp
- Timestamp:
- Jul 15, 2000, 10:08:01 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r3800 r3821 1 /* $Id: dc.cpp,v 1.6 5 2000-07-04 08:42:05sandervl Exp $ */1 /* $Id: dc.cpp,v 1.66 2000-07-15 08:08:01 sandervl Exp $ */ 2 2 3 3 /* … … 1044 1044 return FALSE; 1045 1045 } 1046 //TODO: If frame, exclude client window from update 1047 if(redraw & RDW_FRAME_W) { 1048 hwnd = wnd->getOS2WindowHandle(); 1049 } 1050 else hwnd = wnd->getOS2WindowHandle(); 1051 1052 } 1053 1054 BOOL IncludeChildren = redraw & RDW_ALLCHILDREN_W ? TRUE : FALSE; 1046 hwnd = wnd->getOS2WindowHandle(); 1047 } 1048 1049 BOOL IncludeChildren = (redraw & RDW_ALLCHILDREN_W) ? TRUE : FALSE; 1055 1050 BOOL success = TRUE; 1056 1051 HPS hpsTemp = NULLHANDLE; … … 1117 1112 if (hrgn) { 1118 1113 success = WinInvalidateRegion (hwnd, hrgnTemp, IncludeChildren); 1114 if(IncludeChildren && WinQueryUpdateRect(hwnd, NULL) == FALSE) { 1115 dprintf(("WARNING: WinQueryUpdateRect %x region %x returned false even though we just invalidated part of a window!!!", hwnd, hrgnTemp)); 1116 success = success = WinInvalidateRegion (hwnd, hrgnTemp, FALSE); 1117 } 1119 1118 } 1120 else 1119 else { 1121 1120 success = WinInvalidateRect (hwnd, &rectl, IncludeChildren); 1122 1123 #ifdef DEBUG 1124 if(WinQueryUpdateRect(hwnd, NULL) == FALSE) { 1121 //SvL: If all children are included, then WinInvalidateRect is called 1122 // with fIncludeChildren=1 -> rect of hwnd isn't invalidated if child(ren) 1123 // overlap(s) the specified rectangle completely (EVEN if window doesn't 1124 // have WS_CLIPCHILREN!) 1125 // -> example: XWing vs Tie Fighter install window 1126 // WinInvalidateRect with fIncludeChildren=0 invalidates both the parent 1127 // and child windows 1128 //SvL: Can't always set fIncludeChildren to FALSE or else some controls in 1129 // the RealPlayer setup application aren't redrawn when invalidating 1130 // their parent 1131 // SO: Check if IncludeChildren is set and part of the window is invalid 1132 // If not -> call WinInvalidateRect with IncludeChildren=0 to force 1133 // the window rectangle to be invalidated 1134 // 1135 if(IncludeChildren && WinQueryUpdateRect(hwnd, NULL) == FALSE) { 1125 1136 dprintf(("WARNING: WinQueryUpdateRect %x (%d,%d)(%d,%d) returned false even though we just invalidated part of a window!!!", hwnd, rectl.xLeft, rectl.yBottom, rectl.xRight, rectl.yTop)); 1126 } 1127 #endif 1137 success = WinInvalidateRect (hwnd, &rectl, FALSE); 1138 } 1139 } 1128 1140 1129 1141 if (!success) goto error; … … 1136 1148 if (WinQueryUpdateRect (hwnd, NULL)) 1137 1149 { 1138 if (!pRect && !hrgn)1150 if(!pRect && !hrgn) { 1139 1151 success = WinValidateRect (hwnd, NULL, IncludeChildren); 1152 } 1140 1153 else 1141 if 1154 if(hrgn) { 1142 1155 success = WinValidateRegion (hwnd, hrgnTemp, IncludeChildren); 1143 1156 } 1144 else 1157 else { 1145 1158 success = WinValidateRect (hwnd, &rectl, IncludeChildren); 1146 if (!success) goto error; 1159 } 1160 if(!success) goto error; 1147 1161 } 1148 1162 } … … 1235 1249 else dprintf(("InvalidateRect %x NULL erase=%d", hwnd, erase)); 1236 1250 result = RedrawWindow (hwnd, pRect, NULLHANDLE, 1237 //SvL: If all children are included, then WinInvalidateRect is called 1238 // with fIncludeChildren=1 -> rect of hwnd isn't invalid if child(ren) 1239 // overlap(s) it completely (EVEN if window doesn't have WS_CLIPCHILREN!) 1240 // -> example: XWing vs Tie Fighter install window 1241 // WinInvalidateRect with fIncludeChildren=0 invalidates both the parent 1242 // and child windows 1243 // RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1244 RDW_NOCHILDREN_W | RDW_INVALIDATE_W | 1251 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1245 1252 (erase ? RDW_ERASE_W : RDW_NOERASE_W) | 1246 1253 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0)); … … 1255 1262 dprintf(("InvalidateRgn %x %x erase=%d", hwnd, hrgn, erase)); 1256 1263 result = RedrawWindow (hwnd, NULL, hrgn, 1257 //SvL: If all children are included, then WinInvalidateRegion is called 1258 // with fIncludeChildren=1 -> region of hwnd isn't invalid if child(ren) 1259 // overlap(s) it completely (EVEN if window doesn't have WS_CLIPCHILREN!) 1260 // -> example: XWing vs Tie Fighter install window 1261 // WinInvalidateRegion with fIncludeChildren=0 invalidates both the parent 1262 // and child windows 1263 // RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1264 RDW_NOCHILDREN_W | RDW_INVALIDATE_W | 1264 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | 1265 1265 (erase ? RDW_ERASE_W : RDW_NOERASE_W) | 1266 1266 (hwnd == NULLHANDLE ? RDW_UPDATENOW_W : 0));
Note:
See TracChangeset
for help on using the changeset viewer.