summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-06-03 08:45:04 +0300
committerTor Lillqvist <tml@collabora.com>2014-06-11 10:02:35 +0300
commit1bbc9b7e4e55e627158a29b07ccd3f9fb4faabf1 (patch)
tree114d108391a4b30c1302e78379fd4ecc8354d4d6 /vcl
parentbab30961726da9e5ab9388121970bad33213a421 (diff)
WaE: 'NSCountWindows' is deprecated: first deprecated in OS X 10.6
Change-Id: I7163d3821ac0dfc0d471cf31e98f72953c78d878
Diffstat (limited to 'vcl')
-rw-r--r--vcl/aqua/source/window/salframeview.mm10
1 files changed, 3 insertions, 7 deletions
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 4bb1dfde3c40..48e6adf2b2f3 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -164,15 +164,11 @@ static const struct ExceptionalKey
static AquaSalFrame* getMouseContainerFrame()
{
- NSInteger nWindows = 0;
- NSCountWindows( &nWindows );
- NSInteger* pWindows = (NSInteger*)alloca( nWindows * sizeof(NSInteger) );
- // note: NSWindowList is supposed to be in z-order front to back
- NSWindowList( nWindows, pWindows );
+ NSArray* aWindows = [NSWindow windowNumbersWithOptions:0];
AquaSalFrame* pDispatchFrame = NULL;
- for(int i = 0; i < nWindows && ! pDispatchFrame; i++ )
+ for(NSUInteger i = 0; i < [aWindows count] && ! pDispatchFrame; i++ )
{
- NSWindow* pWin = [NSApp windowWithWindowNumber: pWindows[i]];
+ NSWindow* pWin = [NSApp windowWithWindowNumber:[[aWindows objectAtIndex:i] integerValue]];
if( pWin && [pWin isMemberOfClass: [SalFrameWindow class]] && [(SalFrameWindow*)pWin containsMouse] )
pDispatchFrame = [(SalFrameWindow*)pWin getSalFrame];
}