devdraw: handle windowDidResize on macOS (#212)
This supports non-live window resize.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user