English 中文(简体)
由碳窗口生成的可可窗由飞行任务控制重新订购
原标题:Cocoa windows spawned from Carbon windows are reordered by Mission Control

我有一个基于碳的应用程序, 我正在迁移到可可。 目前, 应用程序窗口是一个碳窗口( CaW 1) 。 这个窗口创建并显示一个可可窗口( CoW 1), 从而创建并显示另一个可可窗口( CoW 2) 。

当我这样做时,屏幕上所有窗口的顺序, 从前后, 如下:

CaW1
CoW1
CoW2

COW2是顶层窗口,下面有COW1,后面有CAW1。这是我所期望的行为。

当我在狮子号发射任务控制中心时 点击我的应用程序 窗户会重新订购

CaW1
CoW2
CoW1

两个可可窗口已经换了位置。 这种行为不是我所期望的。 我本希望COW2仍然高于COW1。

我想弄明白为什么会发生这种事 有什么想法吗?

问题回答

在我与可可窗口的碳基应用软件中, 我习惯于在每个 NSWindow 主计长 子类中添加以下内容:

- (void)windowDidBecomeMain:(NSNotification *)notification
{
    ActivateWindow( (WindowRef) [[self window] windowRef], true );
}

这似乎有助于解决一些窗口订购问题, 但我不知道这是否有助于解决你的问题。





相关问题
2 mysql instances in MAC

i recently switched to mac. first and foremost i installed xampp. then for django-python-mysql connectivity, i "somehow" ended up installing a seperate MySQL. now the seperate mysql installation is ...

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

Switching J2SE versions on Mac OS (SnowLeopard)

My current JDK on Mac OS (10.6) is set to 1.6 and I d like to switch to 1.5. A listing of /System/Library/Frameworks/JavaVM.framework/Versions/ shows: lrwxr-xr-x 1 root wheel 10 Nov 3 18:34 ...

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

export to MP3 from quicktime API

A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...

热门标签