// MW-2011-09-11: [[ Redraw ]] Force an immediate update of the window within the given // region but using the pixmap given. void MCStack::updatewindowwithbuffer(Pixmap p_pixmap, MCRegionRef p_region) { HIViewRef t_root; GetRootControl((WindowPtr)window -> handle . window, &t_root); HIViewRef t_view; GetIndexedSubControl(t_root, 1, &t_view); HIViewSetNeedsDisplayInRegion(t_view, (RgnHandle)p_region, TRUE); // Set the file-local static to the pixmap to use (stacksurface picks this up!) s_update_pixmap = p_pixmap; HIViewRender(t_view); // Unset the file-local static. s_update_pixmap = nil; // MW-2011-10-18: [[ Bug 9798 ]] Make sure we force a screen update after every // update. // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. // HIWindowFlush((WindowPtr)window -> handle . window); // Update the shadow, if required. if (getextendedstate(ECS_MASK_CHANGED)) { // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. HIWindowFlush((WindowPtr)window -> handle . window); HIWindowInvalidateShadow((WindowPtr)window -> handle . window); EnableScreenUpdates(); setextendedstate(False, ECS_MASK_CHANGED); } }
void QEventDispatcherMac::flush() { if(qApp) { QWidgetList tlws = QApplication::topLevelWidgets(); for(int i = 0; i < tlws.size(); i++) { QWidget *tlw = tlws.at(i); if(tlw->isVisible()) HIWindowFlush(qt_mac_window_for(tlw)); } } }
// MW-2011-09-11: [[ Redraw ]] Force an immediate update of the window within the given // region. The actual rendering is done by deferring to the 'redrawwindow' method. void MCStack::updatewindow(MCRegionRef p_region) { HIViewRef t_root; GetRootControl((WindowPtr)window -> handle . window, &t_root); HIViewRef t_view; GetIndexedSubControl(t_root, 1, &t_view); // MW-2011-10-07: [[ Bug 9792 ]] If the mask hasn't changed, use the update region, // else redraw the whole view. if (!getextendedstate(ECS_MASK_CHANGED)) HIViewSetNeedsDisplayInRegion(t_view, (RgnHandle)p_region, TRUE); else { HIViewSetNeedsDisplay(t_view, TRUE); DisableScreenUpdates(); } HIViewRender(t_view); // MW-2012-09-04: [[ Bug 10333 ]] Flush the window immediately to make sure // we see every update. // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. // HIWindowFlush((WindowPtr)window -> handle . window); // Update the shadow, if required. if (getextendedstate(ECS_MASK_CHANGED)) { // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. HIWindowFlush((WindowPtr)window -> handle . window); HIWindowInvalidateShadow((WindowPtr)window -> handle . window); EnableScreenUpdates(); setextendedstate(False, ECS_MASK_CHANGED); } }