![]() |
|
Some inconsistencies with display events |
simast
Member #12,668
March 2011
|
Did a simple test today with display events and noticed two things: - If you minimize a window (using the minimize button) and then restore from the taskbar: two ALLEGRO_EVENT_DISPLAY_SWITCH_IN events will fire. Is this supposed to happen or it's a bug? I would expect a single event here. - Minimizing a window (using the same button) will fire a ALLEGRO_EVENT_DISPLAY_RESIZE event with event.display.width = 0 and event.display.height = 0. A bug or by design? Platform: Windows 7
|
J-Gamer
Member #12,491
January 2011
![]() |
I can't say anything about the first one, but I think the second one is logical. " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
jmasterx
Member #11,410
October 2009
|
I've mentioned those exact things several times (the width and height == 0 one at least). I hope someone eventually does something about them. In all my games I have to check if width and height are zero and ignore the event if so. In addition, when returning from fullscreen window to windowed you do not get a resize event so I have to hack around that and emit one myself. Agui GUI API -> https://github.com/jmasterx/Agui |
simast
Member #12,668
March 2011
|
J-Gamer said: I can't say anything about the first one, but I think the second one is logical. Not really? I mean minimizing does not change display size to 0, thus it shouldn't fire at all. The only events that should fire on minimize are: 1. ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
|
jmasterx
Member #11,410
October 2009
|
At the very least, since Allegro gives a 0,0 event, it should absolutely give a width, height event when you restore, which is the biggest issue. Agui GUI API -> https://github.com/jmasterx/Agui |
Elias
Member #358
May 2000
|
In Linux minimizing only creates a single SWITCH_OUT and nothing else. Restoring creates a single SWITCH_IN. There are no resize events and I don't think there should be. Anyone knows DirectX/win32 (I don't) and wants to fix it? Else we have to wait for Trent again -- |
|