[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Hi, this was posted by orz today on the allegro.cc forums:
>
> >A reproducable bug.
> >Run a windows build of grabber.exe.
> >Press escape to quit.
> >Press alt-tab to go away.
> >Press alt-tab to come back.
> >Only the quit alert is redrawn, not the rest of the screen, even once you
> exit the quit dialog. On >my computer, this happens 100% of the time.
> (win2k)
>
> I would say this also happens in all windows.
>
> I think one solution
> wou be to hook (with set_display_switch_callback(func) a function to save
> window contents on switchout/another to restore them in switch in when doing
> do_dialog and such functions and on its exit
> call remove_switch_callback(func)
> (of course these functions would only be called if get_display_switch_mode()
> is switch_amnesia
> or backamnesia.
>
> What do you think?
> Any other ideas how to fix this in a better way or this one is good enough,
> or not...? =)
I'm not sure the switchout solution would work, because the screen contents
might be lost before the switchout is reported back by the OS. A way around
this would be using double-buffering, and then just blitting the back-buffer
to the screen inside the switchin callback.
But this problem isn't related to the Grabber only, it's a flaw in the GUI
system. The GUI doesn't support any hierarchy, so as soon as a sub-dialog or
a menu is opened, the main dialog disappears.. a possible solution I can see
would be adding a "parent" field to the DIALOG and MENU structs - and inside
the gui_switchin, recursively redraw all the parent DIALOGs/MENUs.
--
Elias Pschernig