If I al_set_new_display_flags(ALLEGRO_FULLSCREEN) then create a display, it has fullscreen features (on Linux, alt-tab does not switch to background windows for instance) but displays "nearly" fullscreen.
See attached screenshot, using released allegro 5.1.2, on a Mageia 2, Linux 64 bits.
Note that if I use ALLEGRO_FULLSCREEN_WINDOW instead, it works well (all screen is black-ed), but I miss the other features of real fullscreen (no alt-tab, etc.).
Well, uncommenting out line 396 on xdisplay.c seems to fix this, but I don't really know why that was commented out in the first place and it's been commented out in the code for a long while. I'm not sure but I think it's due to the NET_WM_STATE_FULLSCREEN hint not being set since that will get set during ALLEGRO_FULLSCREEN_WINDOW but not during ALLEGRO_FULLSCREEN due to that line commented out.
Someone needs to check this patch on a few WMs. Most importantly Unity, and anything else that's popular. If it works there it's fine... however there is a lot of differences between the window managers and "fixing" this on Mageia may break something else (it was tested on a few when the change you're fixing was made.)
Don't rely on no alt-tab within real fullscreen, that's a bug that I want to fix at some point.
Hi,
Just a small reaction on what you said there, even though a little off-topic to the bug report.
I don't think that it should be possible to "alt-tab" on a real fullscreen. For me, this was a feature. Especially when you play a game, you don't want to switch the window focus by mistake to another app, or iconing the app, or whatever. Or am I missing something?
Alt-tab is supposed to work in fullscreen. The purpose of fullscreen isn't to trap the user in an app. Look at any Windows game or properly written (SDL) game on Linux, they all allow alt-tab. The reason it doesn't work is the person who wrote Allegro's fullscreen code was lazy, so it has to be basically rewritten to fix this bug.