You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ***
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
patch to testwm2.c to illustrate the problem (patch00, text/plain, 2014-11-28 09:14:14 +0000, 1476 bytes)Patch to fix the bug. (patch01, text/plain, 2014-11-28 13:46:42 +0000, 2099 bytes)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:
On 2014-11-28 13:46:42 +0000, Rainer Deyke wrote:
On 2014-11-28 13:48:30 +0000, Rainer Deyke wrote:
On 2014-11-29 22:28:54 +0000, Sam Lantinga wrote:
On 2014-11-30 07:21:18 +0000, Rainer Deyke wrote:
On 2015-02-02 06:26:13 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: