void UXViewport::Iconify() { guard(UXViewport::Iconify); if (Iconified) return; Iconified = true; // Pause the game if applicable. if( GIsRunning ) Exec( TEXT("SETPAUSE 1"), *this ); // Release the mouse. SetMouseCapture( 0, 0, 0 ); SetDrag( 0 ); // Reset the input buffer. Input->ResetInput(); // End fullscreen. if( BlitFlags & BLIT_Fullscreen ) EndFullscreen(); GetOuterUClient()->MakeCurrent( NULL ); // Turn auto repeat back on. XAutoRepeatOn( XDisplay ); // Iconify the window. XIconifyWindow( XDisplay, XWindow, DefaultScreen(XDisplay) ); unguard; }
void CShadowUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if (lstrcmpi(pstrName, _T("offset")) == 0) { POINT pt = { 0 }; LPTSTR pstr = NULL; pt.x = _tcstol(pstrValue, &pstr, 10); ASSERT(pstr); pt.y = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr); SetOffset(pt); } else if (lstrcmpi(pstrName, _T("drag")) == 0) { SetDrag(lstrcmpi(pstrValue, _T("true")) == 0); } else if (lstrcmpi(pstrName, _T("traversal")) == 0) { SetTraversal(lstrcmpi(pstrValue, _T("true")) == 0); } else if (lstrcmpi(pstrName, _T("activeimage")) == 0) { SetActiveImage(pstrValue); } else if (lstrcmpi(pstrName, _T("deactiveimage")) == 0) { SetDeactiveImage(pstrValue); } else { CControlUI::SetAttribute(pstrName, pstrValue); } }