jdk/src/macosx/native/sun/awt/LWCToolkit.m
changeset 15988 6db6e40405cf
parent 15985 b9e25a486549
child 17899 d3a864bdee7d
child 18232 b538b71fb429
--- a/jdk/src/macosx/native/sun/awt/LWCToolkit.m	Wed Feb 27 20:34:04 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/LWCToolkit.m	Thu Feb 28 17:04:19 2013 +0400
@@ -177,39 +177,6 @@
     NSBeep(); // produces both sound and visual flash, if configured in System Preferences
 }
 
-CGDirectDisplayID
-FindCGDirectDisplayIDForScreenIndex(jint screenIndex)
-{
-    // most common case - just one monitor
-    CGDirectDisplayID screenID = CGMainDisplayID();
-
-    CGDisplayCount displayCount = 0;
-    CGGetOnlineDisplayList(0, NULL, &displayCount);
-
-    if ((displayCount > 1) &&
-        (screenIndex >= 0) &&
-        (screenIndex < (jint)displayCount))
-    {
-        if (displayCount < 10) {
-            // stack allocated optimization for less than 10 monitors
-            CGDirectDisplayID onlineDisplays[displayCount];
-            CGGetOnlineDisplayList(displayCount, onlineDisplays, &displayCount);
-            screenID = (CGDirectDisplayID)onlineDisplays[screenIndex];
-        } else {
-            CGDirectDisplayID *onlineDisplays =
-            malloc(displayCount*sizeof(CGDirectDisplayID));
-            if (onlineDisplays != NULL) {
-                CGGetOnlineDisplayList(displayCount, onlineDisplays,
-                                       &displayCount);
-                screenID = (CGDirectDisplayID)onlineDisplays[screenIndex];
-                free(onlineDisplays);
-            }
-        }
-    }
-
-    return screenID;
-}
-
 /*
  * Class:     sun_lwawt_macosx_LWCToolkit
  * Method:    initIDs