I was trying to emulate f11 key functionality, it works as expected when I press f11 first time (it successfully flags ALLEGRO_FULLSCREEN_WINDOW), but when I again press f11 then it switches back but it also trrigers ALLEGRO_EVENT_DISPLAY_RESIZE.
Why is it happening? Also, what did you guys do to the allegro forums, it has never been running so smooth ever since I joined. Gotta say, Wow.
I'm only noob guessing here but shouldn't the ' al_resize_display' actually be located under your 'if(event.keyboard.keycode == ALLEGRO_KEY_F11)' block? I'm guessing what happens now is that you are responding to a 'ALLEGRO_EVENT_DISPLAY_RESIZE' event with a command that asks Allegro to resize the display again. I'm not sure though...
EDIT: also, https://liballeg.org/a5docs/trunk/display.html#al_acknowledge_resize might be of interest here?
EDIT2: After trying your code this seems to work for me:
It worked, thanks. Now I know how important ALLEGRO_EVENT_KEY_DOWN is and I didn't know that al_acknowledge_resize() can solve the problem which I tried to solve with resize display. Now I don't need monitor info for display resize.