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

ALLEGRO_FULLSCREEN_WINDOW fails under X11 in Allegro 5.2.8 #1349

Closed
dos1 opened this issue Jul 14, 2022 · 5 comments
Closed

ALLEGRO_FULLSCREEN_WINDOW fails under X11 in Allegro 5.2.8 #1349

dos1 opened this issue Jul 14, 2022 · 5 comments

Comments

@dos1
Copy link
Contributor

dos1 commented Jul 14, 2022

Since commit bd99c16, creating a display with ALLEGRO_FULLSCREEN_WINDOW flag ends up with wrong behavior on X11. Tested with KWin, Mutter and i3.

Instead of making the window span the entire size of the screen, it keeps the size passed to al_create_display and puts it into bottom left corner of the window. al_get_display_width/height functions return the passed dimensions instead of the actual size of the window. This only happens on window creation - toggling fullscreen back and forth makes it work fine.

Here's an example of a FULLSCREEN_WINDOW window created with al_create_display(1280, 720); on a 4K screen.

Allegro 5.2.7:

Screenshot_20220714_173033

Allegro 5.2.8:

Screenshot_20220714_173011

@dos1 dos1 changed the title ALLEGRO_FULLSCREEN_DESKTOP fails under KWin in Allegro 5.2.8 ALLEGRO_FULLSCREEN_DESKTOP fails under X11 in Allegro 5.2.8 Jul 14, 2022
@SiegeLord
Copy link
Member

ALLEGRO_FULLSCREEN_DESKTOP? Do you mean ALLEGRO_FULLSCREEN or ALLEGRO_FULLSCREEN_WINDOW?

I wonder how a timer change could have caused this...

@dos1
Copy link
Contributor Author

dos1 commented Jul 14, 2022

Argghhh, of course ALLEGRO_FULLSCREEN_WINDOW. Mixed it up with competition's SDL_WINDOW_FULLSCREEN_DESKTOP :)

Yep, imagine my surprise when this was the commit that git bisect came up with. I checked it multiple times and I can confirm that reverting this single commit makes it work fine again.

@dos1 dos1 changed the title ALLEGRO_FULLSCREEN_DESKTOP fails under X11 in Allegro 5.2.8 ALLEGRO_FULLSCREEN_WINDOW fails under X11 in Allegro 5.2.8 Jul 14, 2022
@pmprog
Copy link
Contributor

pmprog commented Jul 18, 2022

Have you changed any desktop settings lately? Only I saw this one time when trying to develop on the PinePhone (I was using Raylib at the time, as I was struggling to get Allegro working), and it was due to the desktops DPI/Scaling factor IIRC.

@dos1
Copy link
Contributor Author

dos1 commented Jul 18, 2022

The issue is in Allegro, it goes away and comes back together with the commit mentioned above. Versions earlier than 5.2.8 are not affected. Seems that changing how _al_unix_get_time works comes with some side effect. The only usage I've seen from a quick look appeared to be related to event timestamps, so maybe it influences event ordering?

Also, this issue is reproducible on various window managers, even under XWayland, so it's extremely unlikely it's related to my desktop.

BTW. Allegro should work fine on the PinePhone, although you'll likely want to compile it with GLES, and using SDL backend will give you Wayland support with hidpi that you won't get with Allegro's X11 backend.

@pmprog
Copy link
Contributor

pmprog commented Jul 18, 2022

Fair enough, thought I'd mention it, in case it was of help.

There appears to be a handful of commits on Jan 18, 2022 to do with fullscreen, though I think they only apply to Windows

Also, regarding PinePhone, that was before I was enlightened to the fact that there was, and has been for some time, an SDL backend and I was trying to write my own KMS/DRM+GLES interface for it :)

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

3 participants