mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
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;
|
||||
}
|
||||
|
||||
- (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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue