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 4363 - [PATCH] wayland: broken window resizing - wrong fullscreen toggling, race conditions on resize
Summary: [PATCH] wayland: broken window resizing - wrong fullscreen toggling, race con...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-07 00:21 UTC by Sebastian Krzyszkowiak
Modified: 2018-11-07 00:46 UTC (History)
0 users

See Also:


Attachments
Patch (11.12 KB, patch)
2018-11-07 00:21 UTC, Sebastian Krzyszkowiak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Krzyszkowiak 2018-11-07 00:21:53 UTC
Created attachment 3450 [details]
Patch

For starters, we need to correctly respond to 0,0 configure after unsetting fullscreen, since the window manager won't have proper dimensions cached if the window already started as fullscreen.

Also, after a discussion on #wayland, turned out that there should be no drawing calls at all in between eglSwapBuffers and wl_egl_window_resize, as otherwise EGL can already allocate a wrongly sized buffer for a next frame, which causes misbehavior and in the case of Weston even unrecoverable errors.

Tested with Weston, Rootston, Sway, KWin and Mutter. For perfect operation, KWin needs a patch from https://phabricator.kde.org/D16710, while Mutter needs to fix https://gitlab.gnome.org/GNOME/mutter/issues/378
Comment 1 Sam Lantinga 2018-11-07 00:46:57 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/28303fca62bd