On Sun, Oct 14, 2007 at 07:03:49PM -0400, inhahe wrote: > oh.. yes, it's doing the same thing when i hit the maximize button. > i'm not sure it was doing that before. i do call set_mode with the > value of event.size. here's my code > > elif event.type == pygame.VIDEORESIZE: > print 1 > print event > screen = pygame.display.set_mode(event.size, pygame.RESIZABLE) > screen.fill(background) > pygame.display.flip() > for control in controls: > if control.visible: control.show() Hi,
I'm not sure you should be doing so much in VIDEORESIZE, I wouldn't, but I don't know if that's anything to do with your problem. > if i take out pygame.RESIZABLE, it's the same problem except that half > the title bar is above the monitor and therefore the top of the screen > actually shows (and the bottom is still too high- the whole thing is > just too high, whereas without pygame.RESIZABLE the title bar is in > the right place and only the Surface is too high) > > maximizing just doesn't work right.. > > maybe it does in a more current version of pygame. you mentioned a > more current version has width and height in pygame.display.Info(). > mine doesn't. but mine is 1.7.1release, and that's the latest > available for download on the webpage, do you mean i'd have to get the > SVN and try to compile it for windows myself? Possibly, I'm using an (old-ish) SVN version myself. Did you try the minimal example I posted before? Does it have the same problem? If it has the same problem, try updating SDL.dll, otherwise it sounds like a problem with your app. You might have some luck just replacing the version of 'SDL.dll' in the pygame directory with the latest from the SDL website. http://www.libsdl.org/release/SDL-1.2.12-win32.zip Put it somewhere like C:\Python24\Lib\site-packages\pygame\ (depends on your Python version and where you installed it) I'd rename the version you've already got first - I usually use 'original-SDL.dll' - just in case :-) It *should* be a drop-in replacement, but I've not tried it. It definitely fixes some window positioning bugs like the ones you are describing, cheers, John. > > > > On 10/14/07, John Popplewell <[EMAIL PROTECTED]> wrote: > > On Sun, Oct 14, 2007 at 10:01:32AM -0400, inhahe wrote: > > > hmm, I'm having a problem with this. when i maximize, the title > > > bar goes into the right place, etc., but the actual viewing space > > > is a little too far up. it stops, with no border, a few pixels > > > above the taskbar, and starts a few pixels above the title bar but > > > behind it so stuff is covered up by the title bar. is there any > > > solution to this? > > > > > Does it work correctly when you click the maximize button manually? > > The call to SDL_Maximize() is equivalent. > > > > To make resizing work you, you have to handle the Pygame VIDEORESIZE > > event and ultimately call pygame.display.set_mode() with the value > > of event.size. > > > > I sometimes find it all a bit tricky to get right, what with > > potentially having to recreate all your surfaces again, > > > > cheers, John. > > > > > On 10/14/07, John Popplewell <[EMAIL PROTECTED]> wrote: > > > > On Sun, Oct 14, 2007 at 04:55:14AM +0000, Richard wrote: > > > > > How do I maximize the pygame window or start it maximized? not > > > > > fullscreen, just maximized. by code, not by clicking on the > > > > > maximize button. i can't find a way to do this. if there's > > > > > really not a way to do it, that's kind of disappointing. > > > > Hi, > > > > > > > > you can't using a built-in Pygame function. There is iconify() > > > > but no corresponding restore() or maximize(). It is a limitation > > > > of the underlying SDL library, which is being fixed in SDL-1.3 > > > > (or SDL-2). > > > > > > > > For now, I use the ctypes module to call the platform-specific > > > > functions: > > > > > > > > <snipped!> > > > > > > > > regards, John. > > > > > > > > > >
