plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit d4e16c838ab2cccd97ad6e24fc290239666eaaac
parent 7a241631b2097b1acda431ff059b771c5d1c391c
Author: Pocket7878 <poketo7878@gmail.com>
Date:   Sat, 17 Nov 2018 21:22:42 +0900

devdraw: handle windowDidResize on macOS (#212)

This supports non-live window resize.

Diffstat:
Msrc/cmd/devdraw/cocoa-screen-metal.m | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/cmd/devdraw/cocoa-screen-metal.m b/src/cmd/devdraw/cocoa-screen-metal.m @@ -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(); }); }