Window 'restore' message under Win32?

Hi,

I’ve noticed that, when I restore a maximized window in WindowsXP, I’m not
getting the SDL_VIDEORESIZE event I’d expected. This means that when my app
is restored from a maximized state it looks ugly.

I have not found any mention of this issue in the online docs or the newsgroup
(but feel free to point me to something if I’ve missed it).

Please let me know if:

  1. I’m doing something wrong
  2. This is an SDL bug
  3. This is a Windows bug

I’m using SDL 1.2.7, and the window was created with
SDL_OPENGL|SDL_RESIZABLE. I put a popup in my event processing loop to verify
that the event is not fired on restore. I do receive the event when I
maximize, or drag-size the window. Let me know if any other information is
needed.

Thanks for the help,
– Jeff

Hi,

I’ve noticed that, when I restore a maximized window in WindowsXP, I’m not
getting the SDL_VIDEORESIZE event I’d expected. This means that when my app
is restored from a maximized state it looks ugly.

I think this is an SDL bug. Can you reproduce it with the testwm test
program in the SDL source archive?

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi,

I’ve noticed that, when I restore a maximized window in WindowsXP, I’m not
getting the SDL_VIDEORESIZE event I’d expected. This means that when my
app is restored from a maximized state it looks ugly.

I think this is an SDL bug. Can you reproduce it with the testwm test
program in the SDL source archive?

[I played with testwm on Win98 and XP]

This is more like a feature isn’t it?
SDL_VIDEORESIZE is sent when the size of the window changes.

SDL_VIDEORESIZE isn’t sent when a normal window is iconified/restored, so why
would the situation be any different for a maximized window (on Windows, this
is different from fullscreen)?

SDL_ACTIVEEVENT is sent when the window is iconified/restored so this can be
used, along with knowledge of the size of the window from previous
SDL_VIDEORESIZE events, to restore the surfaces.

In fact, if an app is iconified, the desktop size changed, and the app then
restored, an SDL_ACTIVEEVENT is followed by an SDL_VIDEORESIZE event.

However, I’ve noticed that SDL_ACTIVEEVENT causes beginners (I was caught out)
quite a lot of trouble because ‘state’ can be a combination of the flags:
SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS and SDL_APPACTIVE.

For example, the combination SDL_APPACTIVE | SDL_APPINPUTFOCUS is sent when an
application loses input focus and active status. Separating these three into
different events might be something to think about for SDL 1.3,

best regards,
John.
P.S. congratulations on your new family member!On Sunday 16 May 2004 19:11, Sam Lantinga wrote:

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

“John Popplewell” wrote in message
news:200405172148.03485.john at johnnypops.demon.co.uk

I’ve noticed that, when I restore a maximized window in WindowsXP, I’m
not

getting the SDL_VIDEORESIZE event I’d expected. This means that when
my

app is restored from a maximized state it looks ugly.

This is more like a feature isn’t it?
SDL_VIDEORESIZE is sent when the size of the window changes.

SDL_VIDEORESIZE isn’t sent when a normal window is iconified/restored, so
why
would the situation be any different for a maximized window (on Windows,
this
is different from fullscreen)?

The OP is referring to when a maximised window is restored to a smaller
window, rather than from minimised/iconified to maximised. So the size does
change in this case; I can see the confusion in the wording though.

“John Popplewell” <@John_Popplewell> wrote in message
news:200405172148.03485.@John_Popplewell

I’ve noticed that, when I restore a maximized window in WindowsXP, I’m
not getting the SDL_VIDEORESIZE event I’d expected. This means that when
my app is restored from a maximized state it looks ugly.

This is more like a feature isn’t it?
SDL_VIDEORESIZE is sent when the size of the window changes.

SDL_VIDEORESIZE isn’t sent when a normal window is iconified/restored, so
why would the situation be any different for a maximized window (on
Windows, this is different from fullscreen)?

The OP is referring to when a maximised window is restored to a smaller
window, rather than from minimised/iconified to maximised. So the size does
change in this case; I can see the confusion in the wording though.

I may be staring at one of my linguistic blind-spots: but are you describing
toggling between a maximised and a normal window?

If so, this is what I tried first, and was unable to reproduce the problem.
Using my imagination, I then tried to find an alternative scenario that fit
the description but did produce a ‘problem’. Seems like I tried too hard!

Back in the real world: if the OP can produce a (small) test program that
demonstrates the problem, I would be happy to look at it,

cheers,
John.On Tuesday 01 June 2004 21:52, Nick Howes wrote:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

“John Popplewell” wrote in message
news:200406012309.28244.john at johnnypops.demon.co.uk

“John Popplewell” wrote in message
news:200405172148.03485.john at johnnypops.demon.co.uk

I’ve noticed that, when I restore a maximized window in WindowsXP,
I’m

not getting the SDL_VIDEORESIZE event I’d expected. This means that
when

my app is restored from a maximized state it looks ugly.
SDL_VIDEORESIZE isn’t sent when a normal window is iconified/restored,
so

why would the situation be any different for a maximized window
The OP is referring to when a maximised window is restored to a smaller
window, rather than from minimised/iconified to maximised. So the size
does

change in this case; I can see the confusion in the wording though.

I may be staring at one of my linguistic blind-spots: but are you
describing
toggling between a maximised and a normal window?

yes :slight_smile: although “restore” usually suggests a transition from minimised so i
see where you’re coming from.> On Tuesday 01 June 2004 21:52, Nick Howes wrote: