171172173174175176177178179180181
public Rectangle getHSWindowBounds() { RECT bounds = new RECT(); User32Extra.INSTANCE.GetWindowRect(windowHandle, bounds); return bounds.toRectangle(); } public boolean bringWindowToForeground() { HWND currentWindowHandle = getWindowHandle();
197198199200201202203204205206207
RECT bounds = new RECT(); User32Extra.INSTANCE.GetClientRect(hWnd, bounds); // check to make sure the window's not minimized if (bounds.toRectangle().width >= 1024) { if (isMinimised) { _notifyObserversOfChangeTo("Hearthstone window restored"); isMinimised = false; }
203204205206207208209210211212213
if (isMinimised) { _notifyObserversOfChangeTo("Hearthstone window restored"); isMinimised = false; } if (_isFullScreen(bounds.toRectangle())) { if (!isFullscreen) { _notifyObserversOfChangeTo("Hearthstone running in fullscreen"); isFullscreen = true; } return null;