tdevdraw: respond to windowDidBecomeKey on darwin (#239) - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 4d3c36cce4d70dfd88bd5e782e86141775577d30
parent 047fd921744f39a82a86d9370e03f7af511e6e84
Author: Jacob Vosmaer 
Date:   Fri,  5 Apr 2019 20:43:21 +0200

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.
Diffstat:
  M src/cmd/devdraw/cocoa-screen-metal… |       5 +++++

1 file changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/cmd/devdraw/cocoa-screen-metal.m b/src/cmd/devdraw/cocoa-screen-metal.m
t@@ -373,6 +373,11 @@ struct Cursors {
         return YES;
 }
 
+- (void)windowDidBecomeKey:(id)arg
+{
+        [myContent sendmouse:0];
+}
+
 @end
 
 @implementation DevDrawView