commit - 7d419a14214394e2f9523b78d4b9db59d7c9a025
commit + a61c69337c9242fa91c62bf761a03b6af015a4f9
blob - ee20d6315ad040798513430f655d8060ba8348f3
blob + 70fee3e0d2edf68a72ff3ab3ccc0f882e0284b44
--- src/cmd/devdraw/osx-screen-carbon.m
+++ src/cmd/devdraw/osx-screen-carbon.m
void screeninit(void);
void _flushmemscreen(Rectangle r);
-
static void
InitMultiTouch(void)
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);
+ case kEventWindowDrawContent:
+ // Tried using just flushmemimage here, but
+ // it causes an odd artifact in which making a window
+ // bigger in both width and height can then only draw
+ // on the new border: it's like the old window is stuck
+ // floating on top. Doing a full "get a new window"
+ // seems to solve the problem.
+ eresized(1);
break;
case kEventWindowActivated:
GetWindowBounds(osx.window, kWindowContentRgn, &or);
r = Rect(or.left, or.top, or.right, or.bottom);
- if(Dx(r) == Dx(osx.screenr) && Dy(r) == Dy(osx.screenr)){
+ if(Dx(r) == Dx(osx.screenr) && Dy(r) == Dy(osx.screenr) && !new){
// No need to make new image.
osx.screenr = r;
return;