devdraw: handle windowDidResize on macOS (#212)
This supports non-live window resize.
This commit is contained in:
parent
7a241631b2
commit
d4e16c838a
@ -342,6 +342,13 @@ struct Cursors {
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)windowDidResize:(NSNotification *)notification
|
||||||
|
{
|
||||||
|
if(![myContent inLiveResize] && img) {
|
||||||
|
resizeimg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)windowDidBecomeKey:(id)arg
|
- (void)windowDidBecomeKey:(id)arg
|
||||||
{
|
{
|
||||||
[myContent sendmouse:0];
|
[myContent sendmouse:0];
|
||||||
@ -1112,7 +1119,6 @@ resizewindow(Rectangle r)
|
|||||||
|
|
||||||
s = [myContent convertSizeFromBacking:NSMakeSize(Dx(r), Dy(r))];
|
s = [myContent convertSizeFromBacking:NSMakeSize(Dx(r), Dy(r))];
|
||||||
[win setContentSize:s];
|
[win setContentSize:s];
|
||||||
resizeimg();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user