Hi,
Thanks for a reply. Now, I have realizing what's happening inside allegro much better.
I have found and fixed the bug for me with a creation of maximized windows when the flag ALLEGRO_GTK_TOPLEVEL is not set.
Briefly, the cause is the function _al_xwin_check_maximized (xwindow.c), which silently clears ALLEGRO_MAXIMIZED flag.
Let me show you what is happening:
1. We start from calling xdpy_create_display_locked (xdisplay.c)
2. The function creates for us a window by calling to xdpy_create_display_window.
3. We force sending events to X server.
4. At this moment the X server is already responding to us and the function process_x11_event() proceeds events.
5. To be clear, process_x11_event calls _al_xglx_display_configure_event() for ConfigureNotify event type.
6. The _al_xglx_display_configure_event (xdispaly.c) calls _al_xglx_display_configure and the last one calls al_xwin_check_maximized.
7. al_xwin_check_maximized clears ALLEGRO_MAXIMIZED flag.
8. We are still inside of the function xdpy_create_display_locked...
9. At the moment when we're checking: if (display->flags & ALLEGRO_MAXIMIZED) {} the flag is already cleared.
10. As result we even DO NOT call appropriate function _al_xwin_maximize to send the event to maximize the window.
As for the case when ALLEGRO_GTK_TOPLEVEL is set:
Well, I have a time to investigate it further, but with the current knowledge I assuming that we don't create the maximized window
because of GTK layer & its functions are clear (changing) needed for us X's event masks.
Currently I see that we don't receiving the ConfigureNotify event from X server. This issue I will investigate later, after fixing the issues