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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Oct 5 10:19:49 CEST 2009


Revision: 44654
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44654&view=rev
Author:   thebluegr
Date:     2009-10-05 08:19:43 +0000 (Mon, 05 Oct 2009)

Log Message:
-----------
Window shadows are also taken into account when storing their bits. This fixes the issue where window shadows were left on screen when windows were closed

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 07:51:31 UTC (rev 44653)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-05 08:19:43 UTC (rev 44654)
@@ -191,6 +191,12 @@
 	GuiPort *oldport = _gfx->SetPort(_wmgrPort);
 	_gfx->PenColor(0);
 	if ((wndStyle & kTransparent) == 0) {
+		// Store the shadow, if it exists
+		if ((wndStyle & kUser) == 0) {
+			pWnd->restoreRect.bottom++;
+			pWnd->restoreRect.right++;
+		}
+
 		pWnd->hSaved1 = _gfx->SaveBits(pWnd->restoreRect, 1);
 		if (pWnd->uSaveFlag & 2) {
 			pWnd->hSaved2 = _gfx->SaveBits(pWnd->restoreRect, 2);
@@ -207,6 +213,7 @@
 			_gfx->FrameRect(r);// shadow
 			r.translate(-1, -1);
 			_gfx->FrameRect(r);// window frame
+
 			if (wndStyle & kTitle) {
 				_gfx->FrameRect(r);
 				r.grow(-1);
@@ -227,6 +234,7 @@
 		
 		if ((wndStyle & kTransparent) == 0)
 			_gfx->FillRect(r, 1, pWnd->backClr);
+
 		_gfx->ShowBits(pWnd->dims, 1);
 	}
 	_gfx->SetPort(oldport);


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