[Scummvm-cvs-logs] SF.net SVN: scummvm:[44668] scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Mon Oct 5 20:00:12 CEST 2009


Revision: 44668
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44668&view=rev
Author:   wjpalenstijn
Date:     2009-10-05 18:00:12 +0000 (Mon, 05 Oct 2009)

Log Message:
-----------
SCI: Move restoreRect adjustment from DrawWindow to NewWindow

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-05 17:57:06 UTC (rev 44667)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-05 18:00:12 UTC (rev 44668)
@@ -172,6 +172,15 @@
 			pwnd->rect.top + pwnd->dims.top - oldtop);
 	if (restoreRect == 0)
 		pwnd->restoreRect = pwnd->dims;
+
+	// CHECKME: Is this 'kTransparent' check necessary?
+	// The shadow is already drawn if !(wndStyle & (kUser | kNoFrame)).
+	if (!(pwnd->wndStyle & (kTransparent | kUser | kNoFrame))) {
+		// The shadow is drawn slightly outside the window.
+		// Enlarge restoreRect to cover that.
+		pwnd->restoreRect.bottom++;
+		pwnd->restoreRect.right++;
+	}
 	
 	if (draw)
 		DrawWindow(pwnd);
@@ -191,12 +200,6 @@
 	GuiPort *oldport = _gfx->SetPort(_wmgrPort);
 	_gfx->PenColor(0);
 	if ((wndStyle & kTransparent) == 0) {
-		// Store the shadow, if it exists
-		if (!(wndStyle & kUser) && !(wndStyle & kNoFrame)) {
-			pWnd->restoreRect.bottom++;
-			pWnd->restoreRect.right++;
-		}
-
 		pWnd->hSaved1 = _gfx->SaveBits(pWnd->restoreRect, 1);
 		if (pWnd->uSaveFlag & 2) {
 			pWnd->hSaved2 = _gfx->SaveBits(pWnd->restoreRect, 2);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list