| Reference | Downloads | Github

Strange behavior with retina displays + external monitors in 1.90.2 (py2)



Probably related to a previously fixed issue, but I have no idea how:

Basically, I ran the “screensAndWindows” demo with a few permutations after noticing that stuff opens in weird places and at weird sizes on a second screen when the primary monitor is a retina display. It’s far stranger than I expected. I haven’t tried this on the beta yet, so there’s a chance it may have been fixed, but it doesn’t look like window has changed in any relevant way…

There are five strange behaviors:

  1. When I put winL on screen 0 and winR on screen 1, both windows appear, but only winL shows the stimuli, while winR remains blank.
  2. When I put both windows on screen 1, they report different sizes. winL reports 800, 600 (which would be the expected “size” if it were on a retina display, because of the doubling) and winR reports 400, 300. This is the same as it reports when winL is on screen 0 and winR on screen 1. When both are on screen 0, both report 800, 600.
  3. When both windows are on screen 1, while it reports that the two windows should be adjacent (as when both are on screen 0), they are not:
  4. I asked for framerate reports using getMsPerFrame. When both windows are on screen 1, winR reports impossible refresh rates (0-7ms), but inconsistently. This does not happen when both are on screen 0, or when they are on different screens. This is despite the fact that it won’t show anything in winR when they are on separate screens.
  5. Here’s where things get super strange. If I put winL (the first window created) on screen 1, and winR (the second window created) on screen 0, winL renders but stays blank, and reports being 800x600, but winR renders as follows and reports being 400x300:

I’m using a current-gen MacBook Pro running the most recent version of High Sierra (not Mojave) as my screen0, and an old VGA 1280x1024 LCD as screen1, running through an adapter.

The best that I can figure is that there is something about the first versus second window being created and something about pixel scaling that are interacting very badly, and I can’t track down anything in the Window code that would explain this behavior. I’m pretty lost with this one. Anyone have any ideas?


I don’t know the answers to these issues off the top of my head. The basic problem is indeed probably to do with retina scaling. The problem we have is that the retina silently rescales things. We’ve added a few places to detect that this has happened and readjust, but you’re probably highlighting some new ones. These look like they might be an interaction with Pyglet and you might find different results using the new ‘glfw’ backend on the PsychoPy 3.0 beta


I’m mostly curious why the order of window creation seems to matter. Do you think that’s a pyglet thing?