We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3063 - [PATCH] Wayland: SDL resizes EGL surface to 0x0.
Summary: [PATCH] Wayland: SDL resizes EGL surface to 0x0.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Other
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-15 11:01 UTC by x414e54
Modified: 2016-10-08 01:11 UTC (History)
0 users

See Also:


Attachments
Empty Resize Events Patch. (845 bytes, patch)
2015-07-15 11:01 UTC, x414e54
Details | Diff
Empty Resize Events Patch New. (3.83 KB, patch)
2015-07-16 08:58 UTC, x414e54
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description x414e54 2015-07-15 11:01:56 UTC
Created attachment 2219 [details]
Empty Resize Events Patch.

Wayland will sometimes send empty resize events (0 width and 0 height) to the client. I have not worked out the exact conditions a client would receive these but I can assume it might be if the window is offscreen or not mapped yet.

This causes issues with some SDL clients as they receive the 0x0 event and unexpected resize event or might not request to resize back to the correct size.

As per the wl_shell Wayland spec configure events are only a suggestion and the client is free to ignore or pick a different size (this is how min/max and fixed aspect ratio is supped to be implemented).


A patch is attached but is just the first iteration and I will fix any issues such as checking for FULLSCREEN/MAXIMIZED or RESIZABLE flags unless someone else fixes this first.
Comment 1 x414e54 2015-07-16 08:58:07 UTC
Created attachment 2220 [details]
Empty Resize Events Patch New.

I have update to take into account non resizable and fullscreen windows. Also adding in maximize/restore and title functions for Wayland.
Comment 2 Sam Lantinga 2016-10-08 01:11:40 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/786e10ab72d8