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-03 21:29:03 +0300
commit1b89f986f0e7e6303c4e44cb1ca5d42a5c78c8d4 (patch)
treed83a0f170f95451f80b4c3f1ed901d4320c19c74 /vcl
parent8d69ec4912c4d5bb8eb03e2dece8cbba0910f11b (diff)
WaE: 'NSCountWindows' is deprecated: first deprecated in OS X 10.6
Change-Id: I7163d3821ac0dfc0d471cf31e98f72953c78d878
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/salframeview.mm10
1 files changed, 3 insertions, 7 deletions
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index c0221786460a..34cd70acdf41 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -165,15 +165,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];
}