[MPlayer-dev-eng] [PATCH] Fix for vo macosx play window not actived bug on leopard
Ulion
ulion2002 at gmail.com
Sat Nov 3 19:29:59 CET 2007
2007/11/4, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Sun, Nov 04, 2007 at 01:49:01AM +0800, Ulion wrote:
> [...]
> > Thank you for reply. Since this is only happens on leopard, so I limit
> > the fix only for this os version. Certainly I can ignore the os
> > version to call this patch code on all os, that will also work,
> > because it's generalized halmless patch code. But I still prefer to
> > call the patch code only on leopard.
>
> Introducing special cases means that instead of one code path you now
> have two. In the best case each gets tested half as much then. In
> reality very soon only one will be used regularly and the other will
> bit-rot and break but still be a maintenance burden (since nobody knows
> for sure if it still works and someone uses it).
> So do not make special cases unless you have _no_ other sane choice.
> And in this case: obviously we are doing something different than anyone
> else (I doubt Apple would break a huge percentage of all OSX
> applications), which most likely means the old code is doing something
> _wrong_, and that thing should be found and fixed.
>
In this patch case, old code is known as good on os before leopard,
and new code is only for leopard and tested work. I think both case is
ok without problem. And keep the leopard code to notice us there's
some thing wrong on leopard, we can still keep an eye to found the
real reason cause the problem and maybe fix it in a more generic way.
Indeed the vo quartz works fine without problem, it use the C code
api, the vo macosx use Objective-C api, that's different framework on
mac os x, so this problem could come from the update of Objective-C
part implement of mac os x. But since it's somekind of close-source,
It's hard to find the real reason by now. On the other hand, mplayer
console is a special app on mac osx, it's not a 'bundled' app on os x,
it got foreground operation by an undocumented api, (I also tried the
offiical api to do that, bug is still there), and didn't run NSApp in
a event loop (mplayer run itself's loop and dispatch NSEvent), this
design could be the most possible reason cause our problem. It seems
missed something on leopard, NSApp will not active the NSWindow by
default. There's some reason blocked the connection between them.
If you insist, I can also accept the patch remove os version check,
since it will work anyway.
--
Ulion
More information about the MPlayer-dev-eng
mailing list