Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Wayland: Resize windows with 0x0 requested size to screen size #1430

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2014-04-07 08:34:14 +0000, Thomas Perl wrote:

Created attachment 1609
Proposed patch

With the Wayland video driver, requesting a 0x0 window with SDL_WINDOW_FULLSCREEN will make the window fullscreen, but the EGL surface that’s being created has a size of 1x1. This patch fixes this by making the EGL surface the size of the screen if one or both of the sides are 1 (or 0; 0 gets turned into 1 by SDL_CreateWindow()).

It doesn’t check the flags, because for some reason, SDL_WINDOW_FULLSCREEN isn’t in the flags of the window in the Wayland create window function, even when it is passed to SDL_CreateWindow(). This means that the width/height will also be changed for a SDL_CreateWindow() call /without/ SDL_WINDOW_FULLSCREEN set, but that’s usually okay, because if you create a window of a certain size, you don’t pass in 0x0 as its size.

Patch against yesterday’s Hg default branch attached, successfully tested under QtWayland on Sailfish OS.

On 2014-04-18 03:53:59 +0000, Sam Lantinga wrote:

Got it, thanks!
https://hg.libsdl.org/SDL/rev/e33b5f7df761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant