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 5211

Summary: Window is not resizable on wayland
Product: SDL Reporter: Deve <deveee>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   

Description Deve 2020-06-20 23:29:47 UTC
May be related to https://bugzilla.libsdl.org/show_bug.cgi?id=4859 because as I see you already started working on a patch.

In SDL_Video.c file there is

        if ((want != have) && (_this->SetWindowResizable)) {
            if (want) {
                window->flags |= SDL_WINDOW_RESIZABLE;
            } else {
                window->flags &= ~SDL_WINDOW_RESIZABLE;
            }
            _this->SetWindowResizable(_this, window, (SDL_bool) want);
        }

so that SDL_WINDOW_RESIZABLE flag is set only if there is _this->SetWindowResizable. 

Currently Wayland backend doesn't have this function defined. I made a simple fix:

        if ((want != have)) {
            if (want) {
                window->flags |= SDL_WINDOW_RESIZABLE;
            } else {
                window->flags &= ~SDL_WINDOW_RESIZABLE;
            }
            (_this->SetWindowResizable)
                _this->SetWindowResizable(_this, window, (SDL_bool) want);
        }

and resizing works fine for me on KDE and also on Gnome after I set the hittest function. I'm not sure if/how it affects other backends though.

Or in worst case maybe just create empty SetWindowResizable function for wayland backend to make sure it doesn't break anything else?