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
with al_set_window_constraints() and creation a simplest windows under X11.



On 31 January 2017 at 06:19, Elias Pschernig <[email protected]> wrote:

> ALLEGRO_GTK_TOPLEVEL is only used by the native dialogs addon.
> ALLEGRO_MAXIMIZED flag was introduced much later than the native dialogs
> addon - so yes, it is not implemented there. If you need a GTK window then
> right now it cannot use fullscreen or maximized.
>
> Normal Allegro windows can be maximized though.
>
> On Mon, Jan 30, 2017 at 6:11 PM, Vitaliy T <[email protected]>
> wrote:
>
>> Hi,
>>
>> I am not sure that the information below should be created as an issue on
>> github, because its just questions.
>>
>> I have started "smoking" the issue #725 deeper. The issue is about
>> al_set_window_constraints(). Currently I am stuck with using the
>> `ALLEGRO_MAXIMIZED` flag under GNU/Linux. Running on my box it is not
>> working at all. I commented out some checks that prevents a creation of
>> maximized windows, such as the function `_al_xwin_maximize()` from
>> `xwindow.c` have. Read code, tried various things and so on.
>>
>> The ending of all this is that there is only place in whole allegro code
>> where `d->resize_count++;` is used. Everything is based around checking the
>> field `resize_count`. A place where the field is changing is for
>> non-programmable events (i.e. user clicks on buttons and then the field
>> would be changed). So, I'm considering that  `ALLEGRO_MAXIMIZED`  is not
>> implemented correctly under GNU/Linux at all.
>>
>> Am I right?
>>
>> The information above is correct if `ALLEGRO_GTK_TOPLEVEL` set. If this
>> flag is not set then there is no code to create maximized window at all. Am
>> I right here too?
>>
>> Thanks!
>>
>> --
>> With Best Regards,
>> Vitaliy V. Tokarev
>>
>> _______________________________________________
>> Allegro-developers mailing list
>> [email protected]
>> https://mail.gna.org/listinfo/allegro-developers
>>
>>
>


-- 
With Best Regards,
Vitaliy V. Tokarev
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers

Reply via email to