From 4d3c36cce4d70dfd88bd5e782e86141775577d30 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 5 Apr 2019 20:43:21 +0200 Subject: devdraw: respond to windowDidBecomeKey on darwin (#239) Fixes bug where devdraw does not "notice" mouse position after task switch. Fixes https://github.com/9fans/plan9port/issues/232. --- src/cmd/devdraw/cocoa-screen-metal.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cmd/devdraw') diff --git a/src/cmd/devdraw/cocoa-screen-metal.m b/src/cmd/devdraw/cocoa-screen-metal.m index 049d1c5c..21123f16 100644 --- a/src/cmd/devdraw/cocoa-screen-metal.m +++ b/src/cmd/devdraw/cocoa-screen-metal.m @@ -373,6 +373,11 @@ struct Cursors { return YES; } +- (void)windowDidBecomeKey:(id)arg +{ + [myContent sendmouse:0]; +} + @end @implementation DevDrawView -- cgit v1.2.3