Changeset 50626 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Feb 27, 2014 10:35:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
r50095 r50626 1233 1233 } 1234 1234 1235 static void renderspuWindowRgnApply(WindowInfo *window) 1236 { 1237 HRGN hRgn = window->hRgn; 1238 if (hRgn) 1239 { 1240 /* note: according to the docs, SetWindowRgn owns the regions after it is called, 1241 * and the regions will be freed automatically when needed, 1242 * i.e. the caller should not do that. 1243 * this is why we need to make a copy of the regions to be passed in */ 1244 1245 int result; 1246 hRgn = CreateRectRgn(0, 0, 0, 0); 1247 if (!hRgn) 1248 { 1249 WARN(("CreateRectRgn failed")); 1250 return; 1251 } 1252 1253 result = CombineRgn(hRgn, window->hRgn, NULL, RGN_COPY); 1254 if (result == ERROR) 1255 { 1256 WARN(("CombineRgn failed")); 1257 return; 1258 } 1259 } 1260 1261 SetWindowRgn(window->hWnd, hRgn, true); 1262 } 1263 1235 1264 /* Either show or hide the render SPU's window. */ 1236 1265 void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt ) … … 1239 1268 { 1240 1269 crDebug("SHOW renderspu_SystemShowWindow: %x", window->hWnd); 1241 SetWindowRgn(window->hWnd, window->hRgn, true);1270 renderspuWindowRgnApply(window); 1242 1271 } 1243 1272 else … … 1247 1276 hRgn = CreateRectRgn(0, 0, 0, 0); 1248 1277 SetWindowRgn(window->hWnd, hRgn, true); 1249 DeleteObject(hRgn); 1278 /* note: according to the docs, SetWindowRgn owns the regions after it is called, 1279 * and the regions will be freed automatically when needed, 1280 * i.e. the caller should not do that */ 1250 1281 } 1251 1282 window->visible = showIt; … … 1572 1603 } 1573 1604 1605 window->hRgn = hRgn; 1606 1574 1607 if (window->visible) 1575 SetWindowRgn(window->hWnd, hRgn, true);1608 renderspuWindowRgnApply(window); 1576 1609 1577 1610 crDebug("Render SPU: SetWindowRgn (%x, cRects=%i)", window->hWnd, cRects); 1578 1579 window->hRgn = hRgn;1580 1611 } 1581 1612
Note:
See TracChangeset
for help on using the changeset viewer.