devdraw: handle windowDidResize on macOS (#212)
This supports non-live window resize.
This commit is contained in:
parent
7a241631b2
commit
d4e16c838a
1 changed files with 7 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue