diff options
author | Russ Cox <rsc@swtch.com> | 2010-01-14 13:47:19 -0800 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2010-01-14 13:47:19 -0800 |
commit | fb243a134de240cfafd3eb9db4545d0db5f01638 (patch) | |
tree | d399356edaaf06ad133332db03b9cf7f4ba8bdd1 /src/cmd | |
parent | c51c29052ee4a356d345424249024c67c2ec05ae (diff) | |
download | plan9port-fb243a134de240cfafd3eb9db4545d0db5f01638.tar.gz plan9port-fb243a134de240cfafd3eb9db4545d0db5f01638.tar.bz2 plan9port-fb243a134de240cfafd3eb9db4545d0db5f01638.zip |
devdraw: handle kEventWindowDrawContent
makes windows redraw properly when moved
between screens when monitors get shuffled around
R=
CC=
http://codereview.appspot.com/189076
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/devdraw/osx-screen-carbon.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/devdraw/osx-screen-carbon.m b/src/cmd/devdraw/osx-screen-carbon.m index 0a791c30..4babbf95 100644 --- a/src/cmd/devdraw/osx-screen-carbon.m +++ b/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, void *arg) 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); |