Comment 23 for bug 804321

Revision history for this message
Archimedes Trajano (trajano) wrote :

Is the behaviour the same when using the current version of InsomniaT?

Another hypothesis I can try is changing the code as follows to make multiple displays do nothing.

    if (isMultipleDisplays()) {
  if (isLoggingEnabled()) {
   IOLog("InsomniaT: multiple displays detected doing nothing.\n");
  }
        return;
    }

    if (isSleepEnabled() && !isSleepEnabledBySystem()) {
  if (isLoggingEnabled()) {
   IOLog("InsomniaT: enabling sleep.\n");
  }
  enableSleep();
 } else if (!isSleepEnabled() && isSleepEnabledBySystem()) {
  if (isLoggingEnabled()) {
   IOLog("InsomniaT: disabling sleep.\n");
  }
  disableSleep();
 }