I’m attempting to implement a simple approach to switching to- and from- fullscreen mode, based on the suggestion given here.
Unfortunately, while it appears to work well in the menu, it acts up somewhat once gameplay begins.
The behaviour witnessed seems to be consistent.
To start with, when I enter fullscreen mode, the game insists on doing so on the secondary monitor, regardless of which monitor the game was on while windowed.
Now, if I simply run the game, enter fullscreen mode at the menu, and start the game, I get a partially-rendered image, and nothing more–the image is static. Sound cues seem to indicate that the game is, however, updating. Pressing “escape” to resummon the menu has no visible effect, but again, sound cues indicate that the menu is being opened.
However, if I then alt-tab to something else, the game suddenly springs over to the primary monitor, and starts rendering as expected.
A quick test seems to indicate that this is related to an issue with getting display-sizes under Ubuntu: the following code:
print (base.pipe.getDisplayWidth(), base.pipe.getDisplayHeight())
Produces the following result:
Note that neither monitor has such a resolution.
At a guess, it may be that Panda is attempting to render at that huge resolution, and the system is unhappy about it. When I alt-tab, perhaps the window is re-made or re-sized, resulting in a more appropriate resolution. The initial placement on the secondary monitor might be related to that monitor having the higher vertical resolution (albeit with a lower horizontal resolution).
This is, I think, an issue that I’ve seen mentioned elsewhere before as a problem under Ubuntu (or perhaps Linux in general; I forget). I don’t know what other developers may have done about it, if anything.
I’m using Ubuntu 18.04.2.