liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.88k stars 284 forks source link

Going to fullscreen and back to widowed with menu attached doesn't work in linux #1499

Open ateneouw opened 11 months ago

ateneouw commented 11 months ago

Well, i'm switching between FULLSCREEN_WINDOW and ALLEGRO_WINDOWED. In Windows everything is smoothly i detach the menu from the window, destroy the display, create a new one and go to fullscreen and then when i go back to window i attach again the menu and no problem.

The thing this behavior throw error in linux. When i create the new display the flag ALLEGRO_GTK_TOPLEVEL makes allegro 5 crash. Anyway it's ok when i don't use ALLEGRO_GTK_TOPLEVEL.

In a few words, menu re-atachment doesn't work

pmprog commented 11 months ago

When you go fullscreen back to a window, are you destroying the display and creating a new one there too? Have you trying destroying the menu with the window, and creating a new copy when creating the new window?

SteveFosdick commented 9 months ago

I am having what may be the same issue.

Previously, i.e. up to and including 5.2.8, it was possible to have a full-screen mode in which the menu remained but the window decoration did not and the window expanded to cover things like the top bar/dock, i.e. the menu was then at the very top of the screen. This was done by setting the flag ALLEGRO_FULLSCREEN_WINDOW on the existing display to true, and cancelled by setting it to false, i.e. not destroying the existing display and creating a new one. This looks like this:

Screenshot from 2023-12-29 08-22-27

From 5.2.9 this is no longer possible and, as far as I can tell, the cause is this commit: https://github.com/liballeg/allegro5/commit/cc5c63cadfe1a49bf3d5d34153f284e4d71c34ad

It is possible to do something similar by setting both ALLEGRO_FRAMELESS and ALLEGRO_MAXIMIZED but this is not quite the same:

Screenshot from 2023-12-29 08-27-09

Note the extra bar at the top with the date/time in the centre (this is GNOME).

dos1 commented 6 months ago

Is this fixed by #1524?