tdevdraw: handle windowDidResize on macOS (#212) - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit d4e16c838ab2cccd97ad6e24fc290239666eaaac
DIR parent 7a241631b2097b1acda431ff059b771c5d1c391c
HTML 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:
M src/cmd/devdraw/cocoa-screen-metal… | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
DIR diff --git a/src/cmd/devdraw/cocoa-screen-metal.m b/src/cmd/devdraw/cocoa-screen-metal.m
t@@ -342,6 +342,13 @@ struct Cursors {
return YES;
}
+- (void)windowDidResize:(NSNotification *)notification
+{
+ if(![myContent inLiveResize] && img) {
+ resizeimg();
+ }
+}
+
- (void)windowDidBecomeKey:(id)arg
{
[myContent sendmouse:0];
t@@ -1112,7 +1119,6 @@ resizewindow(Rectangle r)
s = [myContent convertSizeFromBacking:NSMakeSize(Dx(r), Dy(r))];
[win setContentSize:s];
- resizeimg();
});
}