Commit Diff


commit - c51c29052ee4a356d345424249024c67c2ec05ae
commit + fb243a134de240cfafd3eb9db4545d0db5f01638
blob - 0a791c30835935956064f440e50939ca93ab2a64
blob + 4babbf95d57e9b068c3e16e0e355b2331d5a0f26
--- src/cmd/devdraw/osx-screen-carbon.m
+++ src/cmd/devdraw/osx-screen-carbon.m
@@ -381,6 +381,7 @@ _screeninit(void)
 	const EventTypeSpec cmds[] = {
 		{ kEventClassWindow, kEventWindowClosed },
 		{ kEventClassWindow, kEventWindowBoundsChanged },
+		{ kEventClassWindow, kEventWindowDrawContent },
 		{ kEventClassCommand, kEventCommandProcess },
 		{ kEventClassWindow, kEventWindowActivated },
 		{ kEventClassWindow, kEventWindowDeactivated },
@@ -519,6 +520,13 @@ eventhandler(EventHandlerCallRef next, EventRef event,
 			eresized(1);
 			break;
 		
+		case kEventWindowDrawContent:;
+			// The update says what rectangle needs drawing,
+			// but just draw everything.
+			Rectangle r = Rect(0, 0, Dx(osx.screenr), Dy(osx.screenr));
+			_flushmemscreen(r);
+			break;
+
 		case kEventWindowActivated:
 			if(!osx.collapsed)
 				activated(1);