| Summary: | [Patch] Implement Wayland_SetWindowResizable | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ethan Lee <flibitijibibo> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | cameron.gutman |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
Implement Wayland_SetWindowResizable
Implement Wayland_SetWindowResizable |
||
> device->SetWindowBordered = Wayland_SetWindowBordered;
> + device->SetWindowBordered = Wayland_SetWindowResizable;
I assume you meant SetWindowResizable here.
Created attachment 4696 [details]
Implement Wayland_SetWindowResizable
Yup, my mistake - what I get for cleaning up test patches with copypasting.
Nice! This (predictably) fixes my window not being resizable on Wayland. I was just going to try to track that down today. Using GNOME's Super+Left/Right/Up/Down hotkeys would just lead to the window flying around but not actually changing size. With this patch, it works just fine :) I had seen the code handling SDL_WINDOW_RESIZABLE in the Wayland backend, but it never occurred to me that we might not actually be able to set SDL_WINDOW_RESIZABLE on our window because of a missing SetWindowResizable() implementation. Patch added, thanks! https://hg.libsdl.org/SDL/rev/506c8c15349a |
Created attachment 4695 [details] Implement Wayland_SetWindowResizable Attached is a patch to add support for SDL_SetWindowResizable on Wayland. Thankfully, all of the real work is implemented in the window callbacks - the callbacks just check for the RESIZABLE flag, and either ignore/react to window events accordingly.