gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about RunLoop, joystick support and so on


From: Xavier Glattard
Subject: Re: about RunLoop, joystick support and so on
Date: Tue, 13 Feb 2007 11:10:18 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Fred Kiefer <fredkiefer <at> gmx.de> writes:

> Xavier Glattard schrieb:
> > 
> > Another oddity of the win32 backend is the use of a good old window
> > procedure.
> > So the events are dispatched twice : first by some calls to
> > DispatchMessage (always to the same window procedure) and then
> > by NSApplication. I'm sure there
> > is a good reason for that but i can't see it.
> 
> Not sure, if I understand you correctly here. As far as I understand we
> always need a window procedure or is it now possible to do without one?
> This, or rather the method windowEventProc:, does decode the window
> message, depending on its category and builds up an NSEvent that then
> gets dispatched by NSApplication to the corresponding window. I don't
> see any duplication here, am I missing your point? Do you mean, we
> should get rid of the call to DispatchMessage? 

Yes, that's what i mean.
Not 'should' but 'could'. Realy not important. ;-)

> As far as I remember from
> my old windows programming days, this used to be a bad idea. You never
> know what magic Microsoft is applying in the background to allow all the
> different hooks the system offers. And what would be the benefit of
> bypassing this call?

Performance tweak ;-)

I dont know many of Windows programming (i dont know many of anything). You're
probably right : you never know what Microsoft is doing...

As i says in my answer to Richard :
At least i think the DispathMessage/windowProcedure should be hidden in a more
abstract mechanism. Without the window procedure the win32 backend would be more
like the x11 one, and with enough abstraction (that NSStream might gives) some
more code could be shared.

> Could you just give an example of what you want to change here? And
> explain, why this would be better than the current code.
> In the current Windows backend there are already some cases where the
> NSApplication event dispatching is bypassed. I don't like this idea, but
> as I am not using the Windows backend, I am able to just ignore it.
> There is more stuff there that is clearly wrong, like overriding methods
> on NSMenu and NSWindow. To me it looks like somebody with very specific
> requirements as able to shape the Windows backend code to these
> requirements, but none of this is my business.

I didn't look so far in the code... It's frightenning!
It really needs to be rewritten... :-\

> I like what you write about the changes in the run loop handling, but
> Richard will be the one more familiar with that.

Thanks :-)
You would find some ideas my answer to Richard.

> Cheers,
> Fred

Xavier





reply via email to

[Prev in Thread] Current Thread [Next in Thread]