Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Maximum Window Width?

This thread is locked; no one can reply to it. rss feed Print
Maximum Window Width?
Aksel Huff
Member #16,201
February 2016

EDIT: Ah I just realized that it corrects itself if I call al_acknowledge_resize(). So should that be called immediately after creating a display, in case Allegro needs to adjust the display size?

Hello all,

I haven't delved too deep into this, but I just noticed something odd. I was testing my windowing functions and noticed that if I create a window that has a greater width than my screen resolution, the window will be created with the width of the screen. That's understandable, but it seems like Allegro doesn't update it's internal width variable?

My monitor is 1920x1080, if I call al_create_display(2000, 900) I will get a window that is 1920x900, but if I call al_get_display_width(), I get 2000.

This only seems to happen to width as far as I can tell, I seem to be able to make a window that is bigger than the screen vertically, but that's hard to test because of course you can't really pull a window up.

I'm using Allegro 5.2.4 in MSVC 2017.

I can post some source if you want, it could very well be a mistake on my end if no one else can reproduce, or maybe theres a known reason for this.

(I don't actually have a need to create a window bigger than the screen)

Thanks!

Edgar Reynaldo
Member #8,592
May 2007
avatar

My monitor is 1920x1080, if I call al_create_display(2000, 900) I will get a window that is 1920x900, but if I call al_get_display_width(), I get 2000.

That is a bug. Please file a detailed issue report if one does not already exist, on Github here :

https://github.com/liballeg/allegro5/issues

Go to: