While playing with SDL on OSX we have noticed that the main window in the VM is randomly eating events that belong to other windows. This happens because we are consuming events regardless the window they come from.
The corresponding code is in the method pumpRunLoopEventSendAndSignal: in https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/...
I've playing around with making the VM consume only events that come from its own window or from no window (window=null). This seems to work correctly, and I've had run into no issues in the last couple of hours.
I've put a guard so my code is only valid for PHAROVM builds, but I'd gladly remove the guards if people think this is a good move for all the community. You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/295
-- Commit Summary --
* Do only handle events that correspond to the VM window
-- File Changes --
M platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m (18)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/295.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/295.diff
Please do remove the guard. This is clearly the right thing to do on any flavour. Thanks for this important fix!!
Do you want to review John since I believe you have good OSX experience?
If no one else wants to review I'll merge wednesday afternoon.
Ok I will take a look
Sent from my iPhone
On Oct 22, 2018, at 06:28, Clement Bera notifications@github.com wrote:
Do you want to review John since I believe you have good OSX experience?
If no one else wants to review I'll merge wednesday afternoon.
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub, or mute the thread.
Ok it looks ok, not sure if it would affect the older multi-window support but I’m not sure anyone used that anyway.
Thanks John. I was scared because last time someone tried to fix this it had side effect on some events in the main window.
I merge then. We will see if someone complains.
Merged #295 into Cog.
I've posted #296 removing the PharoVM guard and adding some comments.
BTW Thanks!
vm-dev@lists.squeakfoundation.org