devdraw: handle windowDidResize on macOS (#212)

This supports non-live window resize.
This commit is contained in:
Pocket7878 2018-11-17 21:22:42 +09:00 committed by Russ Cox
parent 7a241631b2
commit d4e16c838a

View file

@ -342,6 +342,13 @@ struct Cursors {
return YES;
}
- (void)windowDidResize:(NSNotification *)notification
{
if(![myContent inLiveResize] && img) {
resizeimg();
}
}
- (void)windowDidBecomeKey:(id)arg
{
[myContent sendmouse:0];
@ -1112,7 +1119,6 @@ resizewindow(Rectangle r)
s = [myContent convertSizeFromBacking:NSMakeSize(Dx(r), Dy(r))];
[win setContentSize:s];
resizeimg();
});
}