Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_WINDOWEVENT_MAXIMIZED/RESTORED not issued if doubleclick on title was used #594

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 2 comments
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: Windows 7, x86_64

Comments on the original bug report:

On 2012-05-27 21:36:33 +0000, Andreas Ertelt wrote:

The application will not receive the SDL_WINDOWEVENT subevents SDL_WINDOWEVENT_MAXIMIZED and SDL_WINDOWEVENT_RESTORED if the window was maximized/restored using a doubleclick on the caption/title bar. Retrieving the correct current state is then also impossible using SDL_GetWindowFlags().

This will also stop SDL_RestoreWindow() from working correctly.

However determining the correct state using the windows API querying GWL_STYLE for the window with GetWindowLong and checking if the WS_MAXIMIZE bit is set works fine.

On 2013-07-12 18:52:36 +0000, Ryan C. Gordon wrote:

(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 1.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.

On 2013-08-09 13:03:48 +0000, Andreas Ertelt wrote:

To make this more convenient to fix: In this particular case only a WM_NCLBUTTONDBLCLK event is issued by windows with wParam being equal to HTCAPTION. In this case the appropriate SDL event depending on the window state should be generated.

@icculus
Copy link
Collaborator

icculus commented Aug 9, 2021

Surely this has been fixed at some point, but I'll toss it into the 2.0.18 milestone to verify.

@icculus icculus added this to the 2.0.18 milestone Aug 9, 2021
@slouken slouken self-assigned this Aug 11, 2021
@slouken
Copy link
Collaborator

slouken commented Oct 1, 2021

This appears to be fixed.

Here's the sequence of events that I'm seeing:

INFO: SDL EVENT: Mouse left window 1
INFO: SDL EVENT: Window 1 exposed
INFO: SDL EVENT: Window 1 moved to 0,23
INFO: SDL EVENT: Window 1 changed size to 5120x1377
INFO: SDL EVENT: Window 1 resized to 5120x1377
INFO: SDL EVENT: Window 1 maximized
INFO: SDL EVENT: Window 1 exposed
INFO: SDL EVENT: render targets reset
INFO: SDL EVENT: Mouse entered window 1
INFO: SDL EVENT: Mouse: button 1 pressed at 2629,434 with click count 1 in window 1
INFO: SDL EVENT: Mouse: button 1 released at 2629,434 with click count 1 in window 1
INFO: SDL EVENT: Mouse left window 1
INFO: SDL EVENT: Window 1 moved to 2240,480
INFO: SDL EVENT: Window 1 changed size to 640x480
INFO: SDL EVENT: Window 1 resized to 640x480
INFO: SDL EVENT: Window 1 restored
INFO: SDL EVENT: Window 1 exposed
INFO: SDL EVENT: render targets reset

@slouken slouken closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants