open web browser in screen

The sample code works fine on Linux and macOS, as I just tested.

I don’t know if it works on current Windows, or if it ever worked since Windows Vista changed the display system radically. The transparency support is rather fragile on MS-Windows. E.g., especially with fullscreen windows, transparent window requests are often ignored by some driver like Intel graphics, possibly others.

Update: It doesn’t work on modern Windows with current PTB. However, I spent 67 minutes developing support for this feature on Windows, as tested on Windows-10 and Windows-11. On some graphics cards on Windows, one does need to open a window that is not a fullscreen window, but at least 1 pixel smaller, god knows why, otherwise transparency will not kick in. Also visual timing is always impaired in such a setup on Windows and macOS, as mentioned before. And only colors of the form [0,0,0,alpha] with alpha = 0 for fully transparent, or higher alphas for partial transparency make sense, as otherwise the MS-Windows DWM compositor will weirdly change colors of background pixels, as if multiplying the background pixel colors with the provided color values. These are limitations not present on macOS and Linux iirc., but for the basic “cut a hole into a window to see background content” it will be sufficient.

In the spirit of Christmas time, I’ll provide you with this if you post a paid support authentication token for up to 30 minutes of work time, ie. get 67 minutes of work for the price of 30 minutes. If your lab wasn’t wise enough to buy a support license in advance and would have to buy one first, this might not happen anymore this year though, probably not even before late January.

Otherwise I’ll simply hold this improvement back until somebody pays for it, or until I feel excessively generous.