Re: [AD] Resizable windows on Mac OS X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Resizable windows on Mac OS X
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Sun, 21 Sep 2008 07:57:14 -0400
On 21 Sep 2008, at 05:34, Peter Hull wrote:
It resizes OK but there is a lot of ugly red flashes while it's doing
it
Unfortunately, yes. That happens because Allegro gets sent several
resize messages in one go. What we probably should do (in ex_resize2)
is to see how many resize events there are in the queue and then drop
all but the last one.
and it also loses keyboard input for me. You might need a
makeKeyWindow somewhere.
Ah, didn't mention that. I tried that and it did nothing. Note that
the window does take mouse input, which is double strange.
The [window set ContentView: [window contenView]] line really is an
ugly hack. The keyboard keeps working correctly if you pull that, but
then the graphics are screwed up. :(
I had a quick look at the code. It's OK but in general you don't
subclass NSWindow unless you have to - mostly there is a delegate
method instead. I had to do it to get it to respond to events if
frameless, but for example look at windowShouldClose:, it's
implemented in the delegate. windowWillResize:toSize: is the same.
Ok, thanks. I'll fix that. If you've seen some of my earlier patches,
I had to do it there because I had to store some extra stuff before I
figured out how to do it without needing to do that. :)
Evert