On 02.11.2018, at 04:56, Ben Coman btc@openinworld.com wrote:
On Thu, 1 Nov 2018 at 21:54, Ben Coman btc@openinworld.com wrote:
On Wed, 31 Oct 2018 at 05:48, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Guille, Hi John, Hi All, On Tue, Oct 30, 2018 at 2:10 PM Eliot Miranda eliot.miranda@gmail.com wrote: Hi Guille,
I'm noticing some lock ups, primarily after resolution changes, or long periods of not in interacting. I wonder whether there are a class of window events that the loop does not handle and if this produces a lock up, or rather a failure to notice that new events are incoming. I *think* I have a reproducible case on a MacBookPro whose display resolution is set to "More Space" (see the Displays setting tab).
Have a VM running on the laptop screen while the laptop is connected to an Apple Cinema display (in this configuration the laptop's retina display reverts to its default resolution). Then disconnect the cinema display, at which point the MBP's retina display's resolution changes back to :"More Space" and, at least when I tried this morning, the VM locked up.
Guille, I think you're off the hook. I edited the event loop to include:
if (!(event.window == 0 || event.window == gDelegateApp.window)){ printf("breaking with event.window = %lx (gDA.window = %lx)\n", event.window, gDelegateApp.window); break; }
Random thought... Perhaps when the screen resizes the window bounds are not resized, so for example while the mouse looks like its inside the window, the event coordinates end up outside the window, so the native event dispatching doesn't send the event to the window. It would be interesting to display the bounds-of-the-window together with the event-coordinates and observe how they interact when the screen resolution changes.
Just some blind trawling of the net...
Returns the "backing scale factor" of the view's window https://searchfox.org/mozilla-central/rev/37efe4d0e6d74152023e5e142f670e6a2c...
Get the backing scale factor from an object that supports this selector (NSView/Window/Screen, on 10.7 or later) https://dxr.mozilla.org/mozilla-central/rev/681eb7dfa324dd50403c382888929ea8...
viewDidChangeBackingProperties https://searchfox.org/mozilla-central/rev/37efe4d0e6d74152023e5e142f670e6a2c...
Coding for high resolution on OS X? Read this. http://supermegaultragroovy.com/2012/10/24/coding-for-high-resolution-on-os-...
For windows with zero width or height, the backingScaleFactor method is broken https://fossies.org/linux/firefox/widget/cocoa/nsCocoaWindow.mm
Apple's resizing code not working... https://stackoverflow.com/questions/9204132/same-command-different-results-s...
NSEvent & NSDeviceIndependentModifierFlagsMask http://mirror.informatimago.com/next/developer.apple.com/releasenotes/Cocoa/...
Handle Dynamic Changes in Window Resolution Only When You Must https://developer.apple.com/library/archive/documentation/GraphicsAnimation/...
https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/krono/highdpi-v2
https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/krono/highdpi-v2#d...
https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/krono/highdpi-v2#d...
Best -Tobias
cheers -ben
P.S. maybe not directly related, but just curious...
For events, only y-coordinates are 1-based. https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/C...
"NSEvent -mouseLocation returns invalid coordinate for Retina backing store" http://www.openradar.me/11905408
Dealing with multi screens programming http://www.thinkandbuild.it/deal-with-multiple-screens-programming/