Issue 210: MTWindowPygame Ignores fullscreen parameter
Status:  Done
Owner: ----
Closed:  Apr 2010
Reported by Xac...@gmail.com, Feb 10, 2010
What steps will reproduce the problem?
1. Create a MTWindow like MTWindow(fullscreen=False)
2. runTouchApp()

What is the expected output? What do you see instead?
Expected: a windowed application
Actual: a fullscreen application

What version of the product are you using? On what operating system?
pymt 0.4 with pygame 1.9.1 and OS X

Please provide any additional information below.
class MTWindowPygame(BaseWindow):
    def create_window(self, params):
        # init some opengl, same as before.
        self.flags = pygame.HWSURFACE | pygame.OPENGL | 
pygame.DOUBLEBUF

pygame.HWSURFACE     hardware accelerated, only in FULLSCREEN

This could be the cause, maybe forcing fullscreen.

Feb 10, 2010
#1 Xac...@gmail.com
Okay, my original additional information is wrong (I'm pretty sure).

When I create a MTWindow it seems to ignore all parameters. I think this must be 
some kind of strange scoping bug. Assuming its something going wrong in the 
magical MTWindow assignment under ui/window/__init__.py

My current fix was to copy out the code in win_pygame.py, place it in my own file 
and inherit from ui.window.BaseWindow. Resulted in my own version of 
MTWindowPygame which works... better. Still attempts to fullscreen but then goes 
back to windowed mode.
Feb 10, 2010
Project Member #2 txprog
This is due to our default window.

Default window are created at import time, not anymore when create MTWindow().
If you look at migration document, we ask to avoid usage of MTWindow.

You have several way to customize the fullscreen: in configuration file, or at 
command line.

Not sure anyway if we will fix the bug, at least, we'll remove customization at 
MTWindow() call.


Now, Story time.

To be able to use gl command before window creation, you must have a opengl context.
Before, pyglet was creating a hidden window with opengl activated, then make it 
showed.

For pygame... it's impossible. You can't hide a window. You can iconify but not un-
iconify. It's a missing feature in SDL, and pretty hard to resolve (opengl context.)
Feb 10, 2010
#3 Xac...@gmail.com
This is unfortunate. Though I really like the new configuration GUI.

As for the migration document, I couldn't find it anywhere by scanning the website for 
links. Ended up finding it in the post on NUIgroup forums. Now after looking I can see 
where it is on the website... perhaps it should be in the release notes.

I guess this is what I get for diving straight into the code (an approach I much prefer to 
reading documentation).
Apr 1, 2010
Project Member #4 txprog
documentation fixed in trunk
Status: Done
Labels: Milestone-0.4.1
Jul 2, 2010
Project Member #5 txprog
(No comment was entered for this change.)
Labels: Milestone-0.5