[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] maximize broken..



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()

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?



On 10/14/07, John Popplewell <john@xxxxxxxxxxxxxxxxxxxxxx> 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 <john@xxxxxxxxxxxxxxxxxxxxxx> 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.
> > >
> > >
>