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

No SDL_WINDOWEVENT_MAXIMIZED events under Linux/LXDE #1699

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

No SDL_WINDOWEVENT_MAXIMIZED events under Linux/LXDE #1699

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
duplicate This issue or pull request already exists

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

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

Comments on the original bug report:

On 2014-11-28 09:14:14 +0000, Rainer Deyke wrote:

Created attachment 1943
patch to testwm2.c to illustrate the problem

I'm running Linux Mint 17, using the LXDE desktop environment. I've noticed that I'm not receiving the SDL_WINDOWEVENT_MAXIMIZED, SDL_WINDOWEVENT_MINIMIZED, and SDL_WINDOWEVENT_RESTORED events at all. Also, SDL_GetWindowFlags does not reflect the maximized/minimized state of the window if this was changed through the window manager (e.g. by clicking the maximize or minimize button on the title bar). The attached patch to testwm2.c illustrates the problem, but does not attempt to diagnose or fix it. I propose that the patch be incorporated into SDL immediately, on the basis that more tests are always good.

On 2014-11-28 13:46:42 +0000, Rainer Deyke wrote:

Created attachment 1944
Patch to fix the bug.

On 2014-11-28 13:48:30 +0000, Rainer Deyke wrote:

It turns out that SDL_WINDOWEVENT_MAXIMIZED support was completely missing from the x11 video driver. Fixed in the patch.

On 2014-11-29 22:28:54 +0000, Sam Lantinga wrote:

A few comments...

The window early return could be done at the top of SDL_SendWindowFlagChangeEvents()

Have you tested how this code interacts with programmatic maximizing/minimizing?

The shown state handling worries me. If the window system doesn't support NETWM (eg twm or bare X server), does SDL think windows are always hidden?

On 2014-11-30 07:21:18 +0000, Rainer Deyke wrote:

Created attachment 1947
Latest patch that supersedes both previous patches.

(In reply to Sam Lantinga from comment # 3)

A few comments...

The window early return could be done at the top of
SDL_SendWindowFlagChangeEvents()

Yes, that's an error in my code. I also discovered a more serious error that causes SDL_WINDOWEVENT_MAXIMIZED events to be followed by spurious SDL_WINDOWEVENT_RESTORED events, rendering my patch moot. Fixed in the latest patch.

Have you tested how this code interacts with programmatic
maximizing/minimizing?

SDL_Maximize does not result in a SDL_WINDOWEVENT_MAXIMIZED event; this seems to be intentional, but I am not sure what the correct behavior should be. SDL_Restore from maximized was flat-out broken before the patch and is still broken with the patch. That is a separate bug that should be fixed in a separate patch, IMO.

The shown state handling worries me. If the window system doesn't support
NETWM (eg twm or bare X server), does SDL think windows are always hidden?

If the window system does not support NETWM, then the new code should never be called. Even if it were to be called, it would default to thinking that the window is always shown.

On 2015-02-02 06:26:13 +0000, Ryan C. Gordon wrote:

I believe this is fixed properly by the patch I just applied for Bug # 1447.

https://hg.libsdl.org/SDL/rev/bb0b744fd1a6

Marking this as a duplicate, but feel free to reopen if this was a different concern.

--ryan.

*** This bug has been marked as a duplicate of bug 1447 ***

@SDLBugzilla SDLBugzilla added bug duplicate This issue or pull request already exists labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant